Files
nix-config/users/jordan/default.nix
Jordan Holt 2659ebe5f7
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m20s
users/jordan: add open-webui-api-key
2025-09-08 22:50:46 +01:00

83 lines
1.7 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";
age.secrets.open-webui-api-key = {
rekeyFile = ./secrets/open-webui-api-key.age;
owner = "jordan";
};
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
{
home.persistence."/state" = {
directories = [
"Downloads"
".local/state/wireplumber"
];
};
home.persistence."/persist" = {
directories = [
"Desktop"
"Documents"
"Music"
"Pictures"
"projects"
"Videos"
];
};
}
]
++ 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";
};
}