2023-09-09 00:06:30 +02:00
|
|
|
{
|
2023-10-13 21:04:24 +02:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2023-09-09 00:06:30 +02:00
|
|
|
...
|
2023-10-13 21:04:24 +02:00
|
|
|
}: with lib; let
|
|
|
|
cfg = config.myOptions.programs.gtklock;
|
2024-02-29 00:29:56 +01:00
|
|
|
username = config.myOptions.other.system.username;
|
2023-10-13 21:04:24 +02:00
|
|
|
in {
|
|
|
|
options.myOptions.programs.gtklock.enable = mkEnableOption "enable gtklock";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-11-25 19:16:22 +01:00
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/158025
|
|
|
|
security.pam.services.gtklock.text = "auth include login";
|
|
|
|
|
2024-02-29 00:29:56 +01:00
|
|
|
home-manager.users.${username} = {
|
2023-10-13 21:04:24 +02:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
gtklock
|
|
|
|
];
|
2023-09-09 00:06:30 +02:00
|
|
|
|
2023-10-13 21:04:24 +02:00
|
|
|
xdg.configFile."gtklock/config.ini".text = ''
|
|
|
|
[main]
|
|
|
|
gtk-theme=${config.myOptions.themes.gtk.name}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-09-09 00:06:30 +02:00
|
|
|
}
|