modules: move waylock to configs/lockscreen
This commit is contained in:
parent
e1888c72a8
commit
522f71411c
4 changed files with 24 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
|||
./nix.nix
|
||||
./sound.nix
|
||||
./system.nix
|
||||
./lockscreen
|
||||
./window-manager
|
||||
];
|
||||
}
|
||||
|
|
4
modules/nixos/configs/lockscreen/default.nix
Normal file
4
modules/nixos/configs/lockscreen/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./waylock.nix ];
|
||||
}
|
18
modules/nixos/configs/lockscreen/waylock.nix
Normal file
18
modules/nixos/configs/lockscreen/waylock.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue