modules: move waylock to configs/lockscreen

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-23 14:05:24 +03:00
parent e1888c72a8
commit 522f71411c
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
4 changed files with 24 additions and 5 deletions

View file

@ -7,6 +7,7 @@
./nix.nix ./nix.nix
./sound.nix ./sound.nix
./system.nix ./system.nix
./lockscreen
./window-manager ./window-manager
]; ];
} }

View file

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./waylock.nix ];
}

View file

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
let
cfg = config.local.window-manager.hyprland;
in
{
options.local.lockscreen.waylock = with lib; {
enable = mkEnableOption "waylock";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.unstable.waylock ];
security.pam.services.waylock .text = ''
auth required pam_unix.so try_first_pass nullok
auth optional pam_permit.so
'';
};
}

View file

@ -16,10 +16,6 @@ in
programs.gnupg.agent.pinentryFlavor = "gtk2"; programs.gnupg.agent.pinentryFlavor = "gtk2";
environment.systemPackages = [ pkgs.unstable.waylock ]; local.lockscreen.waylock.enable = lib.mkDefault true;
security.pam.services.waylock .text = ''
auth required pam_unix.so try_first_pass nullok
auth optional pam_permit.so
'';
}; };
} }