diff --git a/home-config/config/desktop/hyprland.nix b/home-config/config/desktop/hyprland.nix index bb0e4209..4019cc87 100644 --- a/home-config/config/desktop/hyprland.nix +++ b/home-config/config/desktop/hyprland.nix @@ -6,6 +6,7 @@ ... }: let hyprctl = "${flake-inputs.hyprland.packages.${pkgs.system}.hyprland-nvidia}/bin/hyprctl"; + loginctl = "${pkgs.systemd}/bin/loginctl"; wpaperd-config = { default = { @@ -55,14 +56,38 @@ in { enable = true; systemdTarget = "graphical-session.target"; + events = [ + { + event = "lock"; + command = "${config.programs.swaylock.package}/bin/swaylock"; + } + ]; + timeouts = [ { timeout = 5 * 60; command = "${hyprctl} dispatch dpms off"; } + { + timeout = 6 * 60; + command = "${loginctl} lock-session"; + } ]; }; + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + screenshots = true; + clock = true; + indicator = true; + indicator-radius = 100; + indicator-thickness = 7; + effect-blur = "7x5"; + }; + }; + systemd.user.services.wpaperd = { Unit = { Description = "Wallpaper daemon"; diff --git a/nixos-config/default.nix b/nixos-config/default.nix index cd114a83..9da8946c 100644 --- a/nixos-config/default.nix +++ b/nixos-config/default.nix @@ -146,6 +146,8 @@ hyprland.enable = true; }; + security.pam.services.swaylock = {}; + fonts = { enableDefaultFonts = true;