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
|
|
|
...
|
2024-05-05 12:38:40 +02:00
|
|
|
}: let
|
2024-07-15 23:18:25 +02:00
|
|
|
cfg = config.poz.programs.gtklock;
|
|
|
|
inherit (config.poz.other.system) username;
|
2024-05-05 12:38:40 +02:00
|
|
|
|
2024-07-25 11:45:44 +02:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.options) mkEnableOption;
|
2023-10-13 21:04:24 +02:00
|
|
|
in {
|
2024-07-15 23:18:25 +02:00
|
|
|
options.poz.programs.gtklock.enable = mkEnableOption "gtklock";
|
2024-07-24 18:47:53 +02:00
|
|
|
|
2023-10-13 21:04:24 +02:00
|
|
|
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} = {
|
2024-08-25 20:17:14 +02:00
|
|
|
home.packages = [ 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]
|
2024-07-15 23:18:25 +02:00
|
|
|
gtk-theme=${config.poz.themes.gtk.name}
|
2023-10-13 21:04:24 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-09-09 00:06:30 +02:00
|
|
|
}
|