diff --git a/modules/home/default.nix b/modules/home/default.nix index 4a2e512..c1f6d01 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -5,7 +5,7 @@ ./programs ./services ./settings - ./sway + ./wms ./users ../../overlays ../../variables diff --git a/modules/home/sway/autostart/default.nix b/modules/home/sway/autostart/default.nix deleted file mode 100644 index 92c1f3c..0000000 --- a/modules/home/sway/autostart/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ pkgs, ... }: -{ - wayland.windowManager.sway.config = { - bars = [ {command = "waybar";} ]; - - startup = [ - # Scratchpads - {command = "foot -a gotop -T Gotop gotop";} - {command = "foot -a music -T Music ncmpcpp";} - {command = "foot -a sound -T Sound pulsemixer";} - {command = "easyeffects";} - - # Daemons and tray apps - {command = "wl-paste -t text --watch clipman store -P";} - {command = "wl-copy";} - {command = "mako";} - {command = "sunshine";} - - # Polkit agent - {command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";} - - # Foreground apps - {command = "librewolf -P Misc --name=MiscBrowser";} - {command = "vesktop";} - {command = "fractal";} - {command = "thunderbird";} - ]; - }; -} diff --git a/modules/home/wms/default.nix b/modules/home/wms/default.nix new file mode 100644 index 0000000..e662554 --- /dev/null +++ b/modules/home/wms/default.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + imports = [ + ./sway + ./swaylock + ./waybar + ]; +} diff --git a/modules/home/wms/sway/autostart/default.nix b/modules/home/wms/sway/autostart/default.nix new file mode 100644 index 0000000..b2f7cc2 --- /dev/null +++ b/modules/home/wms/sway/autostart/default.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: +{ + wayland.windowManager.sway.config = { + bars = [{ command = "waybar"; }]; + + startup = [ + # Lock on startup + { command = "swaylock"; } + + # Scratchpads + { command = "foot -a gotop -T Gotop gotop"; } + { command = "foot -a music -T Music ncmpcpp"; } + { command = "foot -a sound -T Sound pulsemixer"; } + { command = "easyeffects"; } + + # Daemons and tray apps + { command = "wl-paste -t text --watch clipman store -P"; } + { command = "wl-copy"; } + { command = "mako"; } + { command = "sunshine"; } + + # Polkit agent + { command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; } + + # Foreground apps + { command = "librewolf -P Misc --name=MiscBrowser"; } + { command = "vesktop"; } + { command = "fractal"; } + { command = "thunderbird"; } + ]; + }; +} diff --git a/modules/home/sway/default.nix b/modules/home/wms/sway/default.nix similarity index 96% rename from modules/home/sway/default.nix rename to modules/home/wms/sway/default.nix index d40d318..70dbeff 100644 --- a/modules/home/sway/default.nix +++ b/modules/home/wms/sway/default.nix @@ -1,15 +1,14 @@ { config, pkgs, ... }: { imports = [ + ./autostart ./hardware - ./theme ./hotkeys ./programs ./rules - ./autostart - ./waybar ./swayshot - ./swaylock + ./swaysleep + ./theme ]; wayland.windowManager.sway = { diff --git a/modules/home/sway/hardware/default.nix b/modules/home/wms/sway/hardware/default.nix similarity index 100% rename from modules/home/sway/hardware/default.nix rename to modules/home/wms/sway/hardware/default.nix diff --git a/modules/home/sway/hotkeys/README.md b/modules/home/wms/sway/hotkeys/README.md similarity index 100% rename from modules/home/sway/hotkeys/README.md rename to modules/home/wms/sway/hotkeys/README.md diff --git a/modules/home/sway/hotkeys/default.nix b/modules/home/wms/sway/hotkeys/default.nix similarity index 100% rename from modules/home/sway/hotkeys/default.nix rename to modules/home/wms/sway/hotkeys/default.nix diff --git a/modules/home/sway/programs/default.nix b/modules/home/wms/sway/programs/default.nix similarity index 100% rename from modules/home/sway/programs/default.nix rename to modules/home/wms/sway/programs/default.nix diff --git a/modules/home/sway/rules/default.nix b/modules/home/wms/sway/rules/default.nix similarity index 100% rename from modules/home/sway/rules/default.nix rename to modules/home/wms/sway/rules/default.nix diff --git a/modules/home/sway/swayshot/default.nix b/modules/home/wms/sway/swayshot/default.nix similarity index 100% rename from modules/home/sway/swayshot/default.nix rename to modules/home/wms/sway/swayshot/default.nix diff --git a/modules/home/sway/swayshot/swappy/default.nix b/modules/home/wms/sway/swayshot/swappy/default.nix similarity index 100% rename from modules/home/sway/swayshot/swappy/default.nix rename to modules/home/wms/sway/swayshot/swappy/default.nix diff --git a/modules/home/wms/sway/swaysleep/default.nix b/modules/home/wms/sway/swaysleep/default.nix new file mode 100644 index 0000000..b380275 --- /dev/null +++ b/modules/home/wms/sway/swaysleep/default.nix @@ -0,0 +1,10 @@ +{ pkgs, config, ... }: +{ + home.packages = with pkgs; [ + (pkgs.writeScriptBin "swaysleep" '' + swaylock & ${pkgs.swayidle}/bin/swayidle -w \ + timeout 1 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"; pkill -9 swayidle' + '') + ]; +} diff --git a/modules/home/sway/theme/default.nix b/modules/home/wms/sway/theme/default.nix similarity index 100% rename from modules/home/sway/theme/default.nix rename to modules/home/wms/sway/theme/default.nix diff --git a/modules/home/sway/swaylock/default.nix b/modules/home/wms/swaylock/default.nix similarity index 74% rename from modules/home/sway/swaylock/default.nix rename to modules/home/wms/swaylock/default.nix index fc53b1d..8fcb407 100644 --- a/modules/home/sway/swaylock/default.nix +++ b/modules/home/wms/swaylock/default.nix @@ -41,17 +41,4 @@ in { indicator-radius = 80; }; }; - - home.packages = with pkgs; [ - (pkgs.writeScriptBin "swaysleep" '' - swaylock & ${pkgs.swayidle}/bin/swayidle -w \ - timeout 1 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"; pkill -9 swayidle' - '') - ]; - - # Enable Swaylock on startup - wayland.windowManager.sway.config.startup = [ - { command = "swaylock"; } - ]; } diff --git a/modules/home/sway/waybar/default.nix b/modules/home/wms/waybar/default.nix similarity index 100% rename from modules/home/sway/waybar/default.nix rename to modules/home/wms/waybar/default.nix diff --git a/modules/system/programs/sway/default.nix b/modules/system/programs/sway/default.nix index dbcfdbb..cd1024b 100644 --- a/modules/system/programs/sway/default.nix +++ b/modules/system/programs/sway/default.nix @@ -1,9 +1,6 @@ { config, pkgs, ... }: { - imports = [ - ./greetd - ./portals - ]; + imports = [ ./greetd ]; programs.sway = { enable = config.system.desktop.enable; diff --git a/modules/system/programs/sway/portals/default.nix b/modules/system/programs/sway/portals/default.nix deleted file mode 100644 index cc021d4..0000000 --- a/modules/system/programs/sway/portals/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, pkgs, ... }: -{ - xdg.portal = { - wlr = { - enable = config.system.desktop.enable; - settings.screencast = { - max_fps = 60; - chooser_type = "simple"; - chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099"; - }; - }; - }; -} diff --git a/modules/system/services/general/default.nix b/modules/system/services/general/default.nix index d97e4b9..ddc173a 100644 --- a/modules/system/services/general/default.nix +++ b/modules/system/services/general/default.nix @@ -6,6 +6,7 @@ ./keyd ./libvirtd ./mpd + ./portals ./ssh ./sunshine ./tlp diff --git a/modules/system/services/general/portals/default.nix b/modules/system/services/general/portals/default.nix new file mode 100644 index 0000000..bf2f553 --- /dev/null +++ b/modules/system/services/general/portals/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./wlr + ]; +} diff --git a/modules/system/services/general/portals/wlr/default.nix b/modules/system/services/general/portals/wlr/default.nix new file mode 100644 index 0000000..6554b68 --- /dev/null +++ b/modules/system/services/general/portals/wlr/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: +{ + xdg.portal.wlr = { + enable = config.system.desktop.enable; + settings.screencast = { + max_fps = 60; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099"; + }; + }; +}