{ inputs, lib, config, pkgs, ... }: let inherit (lib) optional ; name = "jordan"; hostFile = ./. + "/${config.networking.hostName}.nix"; in { age.secrets."passwords/users/jordan".file = "${inputs.secrets}/passwords/users/jordan.age"; users.users.${name} = { description = "Jordan Holt"; extraGroups = [ "audio" "docker" "lxd" "networkmanager" "wheel" ]; group = "users"; hashedPasswordFile = config.age.secrets."passwords/users/jordan".path; isNormalUser = true; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com" ]; shell = pkgs.zsh; uid = 1000; }; home-manager.users.${name} = { imports = [ ./common/git.nix ./common/gpg.nix ./common/neovim.nix ./common/pass.nix ./common/shell.nix ./common/ssh.nix ] ++ optional (builtins.pathExists hostFile) hostFile; home = { username = name; }; xdg.enable = true; }; # Workaround: https://github.com/nix-community/home-manager/issues/7166 systemd.services."home-manager-${name}".serviceConfig = { RemainAfterExit = "yes"; }; }