fix: add option to not install package for sway / swaylock

avoid problems with nix on Debian
This commit is contained in:
Yorick Barbanneau 2024-06-19 01:03:52 +02:00
parent ce7338040e
commit dea3740249
4 changed files with 42 additions and 6 deletions

View file

@ -7,6 +7,14 @@ in
config = mkIf config.modules.desktop.sway.enable {
wayland.windowManager.sway = {
enable = true;
# Do not install sway package on other system that NixOS
# because performance issue
package =
if cfg.installPackage
then pkgs.sway
else null;
wrapperFeatures.gtk = true;
systemd.enable = true;
config = {
@ -61,7 +69,10 @@ in
"${mod}+Shift+q" = "kill";
"${mod}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel";
"${mod}+Shift+c" = "reload";
"${mod}+Alt+l" = "exec ${pkgs.swaylock}/bin/swaylock";
"${mod}+Alt+l" =
if cfg.installPackage
then "exec ${pkgs.swaylock}/bin/swaylock"
else "exec swaylock";
"${mod}+${left} focus" = "left";
"${mod}+${down} focus" = "down";
"${mod}+${up} focus" = "up";