niksos/modules/gui/gtklock.nix
2024-07-16 00:26:09 +02:00

29 lines
730 B
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.myOptions.programs.gtklock;
inherit (config.myOptions.other.system) username;
inherit (lib) mkEnableOption mkIf;
in {
options.myOptions.programs.gtklock.enable = mkEnableOption "gtklock";
config = mkIf cfg.enable {
# https://github.com/NixOS/nixpkgs/issues/158025
security.pam.services.gtklock.text = "auth include login";
home-manager.users.${username} = {
home.packages = with pkgs; [
gtklock
];
xdg.configFile."gtklock/config.ini".text = ''
[main]
gtk-theme=${config.myOptions.themes.gtk.name}
'';
};
};
}