system/modules/nixos/configs/lockscreen/waylock.nix

19 lines
430 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
2024-04-24 01:03:36 +03:00
cfg = config.local.lockscreen.waylock;
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
'';
};
}