depot/third_party/nixpkgs/nixos/modules/programs/wayland/hyprlock.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

25 lines
653 B
Nix

{ lib, pkgs, config, ... }:
let
cfg = config.programs.hyprlock;
in
{
options.programs.hyprlock = {
enable = lib.mkEnableOption "hyprlock, Hyprland's GPU-accelerated screen locking utility";
package = lib.mkPackageOption pkgs "hyprlock" { };
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [
cfg.package
];
# Hyprlock needs Hypridle systemd service to be running to detect idle time
services.hypridle.enable = true;
# Hyprlock needs PAM access to authenticate, else it fallbacks to su
security.pam.services.hyprlock = {};
};
meta.maintainers = with lib.maintainers; [ johnrtitor ];
}