niksos/modules/gui/gtklock.nix

28 lines
703 B
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.poz.programs.gtklock;
inherit (config.poz.other.system) username;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
in {
options.poz.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 = [ pkgs.gtklock ];
xdg.configFile."gtklock/config.ini".text = ''
[main]
gtk-theme=${config.poz.themes.gtk.name}
'';
};
};
}