Initial transfer to sway on work PC #2

Merged
erwin merged 23 commits from feature/sway-at-work into main 2023-09-29 11:52:47 +02:00
Showing only changes of commit 3bab1423c0 - Show all commits

View file

@ -27,6 +27,27 @@ let
${config.home-manager.users.erwin.eboskma.programs.eww.package}/bin/eww $@ ${config.home-manager.users.erwin.eboskma.programs.eww.package}/bin/eww $@
''; '';
workspacePartition = builtins.concatLists (builtins.attrValues (builtins.mapAttrs
(
name: workspaces:
let
output =
if name == "right"
then "DP-1"
else "DP-3";
in
builtins.map
(ws: {
inherit output;
workspace = toString ws;
})
workspaces
)
(builtins.partition
(n: (trivial.mod n 2) != 0)
(lists.range 1 10))));
in in
{ {
config = mkIf cfg.work { config = mkIf cfg.work {
@ -37,6 +58,7 @@ in
var.workSystem = true; var.workSystem = true;
programs = { programs = {
alacritty.enable = false; alacritty.enable = false;
anyrun.enable = true;
atuin.enable = true; atuin.enable = true;
bat.enable = true; bat.enable = true;
cargo = { cargo = {
@ -125,12 +147,13 @@ in
sway = { sway = {
enable = true; enable = true;
output = { output = {
"DP-0" = { "DP-1" = {
# bg = "${./wallpapers/jwst-saturn-nircam-2560.png} fill"; bg = "${../../home-manager/modules/sway/wallpapers/river-3840.png} fill";
mode = "3840x2160@60Hz"; mode = "3840x2160@60Hz";
position = "0 0"; position = "0 0";
}; };
"DP-4" = { "DP-3" = {
bg = "${../../home-manager/modules/sway/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png} fill";
mode = "3840x2160@60Hz"; mode = "3840x2160@60Hz";
position = "3840 0"; position = "3840 0";
}; };
@ -149,6 +172,7 @@ in
{ command = "${ewwDaemon} --restart open bar-work"; always = true; } { command = "${ewwDaemon} --restart open bar-work"; always = true; }
{ command = "${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0"; } { command = "${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0"; }
]; ];
workspaceOutputs = workspacePartition;
}; };
swaynotificationcenter.enable = true; swaynotificationcenter.enable = true;
zellij = { zellij = {
@ -327,6 +351,7 @@ in
imports = [ imports = [
../../modules/options ../../modules/options
inputs.anyrun.nixosModules.home-manager
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); ] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
}; };