From ec747a04e89e28392bd1576971283217536e9434 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 20 Feb 2024 04:16:11 -0600 Subject: [PATCH] add service for lock --- modules/desktop/window-managers/hyprland.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/desktop/window-managers/hyprland.nix b/modules/desktop/window-managers/hyprland.nix index c423f97..4c35d15 100644 --- a/modules/desktop/window-managers/hyprland.nix +++ b/modules/desktop/window-managers/hyprland.nix @@ -17,6 +17,17 @@ }; in { config = mkIf cfg.enable { + systemd.services.screen-locker = { + wantedBy = ["sleep.target"]; + description = "Lock the screen using a custom lock script"; + before = ["suspend.target"]; + serviceConfig = { + User = "daylin"; + Type = "forking"; + Environment = "DISPLAY=:0"; + ExecStart = "${lock}/bin/lock"; + }; + }; security.pam.services.swaylock = {}; # programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default; # Optional, hint electron apps to use wayland: