Files
nix-config/users/jordan/default.nix
Jordan Holt 46a5a208ff
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m16s
home-manager: activate on switch
2025-05-30 23:18:01 +01:00

59 lines
1.2 KiB
Nix

{
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";
};
}