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
./sound.nix
./system.nix
./lockscreen
./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";
environment.systemPackages = [ pkgs.unstable.waylock ];
security.pam.services.waylock .text = ''
auth required pam_unix.so try_first_pass nullok
auth optional pam_permit.so
'';
local.lockscreen.waylock.enable = lib.mkDefault true;
};
}