diff --git a/flake.nix b/flake.nix index 22d318a..f738a9d 100644 --- a/flake.nix +++ b/flake.nix @@ -140,6 +140,7 @@ { home-manager.users.bertof.imports = [ ./modules/hm/hyprland.nix + ./modules/hm/swayidle.nix ]; } ] ++ homeManagerModules ++ [ @@ -168,6 +169,7 @@ { home-manager.users.bertof.imports = [ ./modules/hm/hyprland.nix + ./modules/hm/swayidle.nix ]; } ] ++ homeManagerModules ++ [ diff --git a/modules/hm/hyprland.nix b/modules/hm/hyprland.nix index 7eb9e05..55c0e32 100644 --- a/modules/hm/hyprland.nix +++ b/modules/hm/hyprland.nix @@ -11,7 +11,6 @@ # wayland.windowManager.hyprland = { }; - xdg.configFile."hypr/hyprland.conf".text = let strPalette = pkgs.lib.nix-rice.palette.toRgbaShortHex pkgs.rice.colorPalette; diff --git a/modules/hm/swayidle.nix b/modules/hm/swayidle.nix new file mode 100644 index 0000000..e983b5f --- /dev/null +++ b/modules/hm/swayidle.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + services.swayidle = { + enable = true; + events = [ + { event = "before-sleep"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; } + { event = "lock"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; } + ]; + timeouts = [ + { timeout = 60; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; } + ]; + }; +}