{ flake, lib, config, hostName, userName, pkgs, ... }: let haveGKleen = flake.nixosModules.accounts ? "gkleen@${hostName}"; in { imports = with flake.nixosModules.userProfiles.${userName}; [ zsh tmux utils ]; users.users.${userName} = lib.mkIf haveGKleen { inherit (config.users.users."gkleen") hashedPassword shell; openssh.authorizedKeys.keyFiles = config.users.users."gkleen".openssh.authorizedKeys.keyFiles; }; home-manager.users.${userName} = { programs = lib.mkIf haveGKleen { inherit (config.home-manager.users.gkleen.programs) git ssh gpg; }; services = { gpg-agent = { enable = true; enableSshSupport = true; extraConfig = '' pinentry-program ${pkgs.pinentry-curses}/bin/pinentry grab ''; }; }; }; }