Files
dotfiles/users/math/default.nix
2026-03-18 19:29:59 -04:00

53 lines
1.0 KiB
Nix

{
pkgs,
config,
...
}:
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in
{
sops.secrets.math_password = {
sopsFile = ../secrets.yaml;
neededForUsers = true;
};
users = {
users.math = {
isNormalUser = true;
hashedPasswordFile = "${config.sops.secrets.math_password.path}";
shell = pkgs.zsh;
group = "math";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJH03VzDbUhzfhvwD+OsYh6GobODYaI9jdNdzWQoqFsp matth@Jove" # cspell:disable-line
];
extraGroups = [
"audio"
"video"
"wheel"
"users"
]
++ ifTheyExist [
"dialout"
"docker"
"hass"
"libvirtd"
"networkmanager"
"plugdev"
"scanner"
"transmission"
"uaccess"
"wireshark"
];
uid = 1003;
};
groups.math.gid = 1003;
};
home-manager.users.math = import ./systems/${config.networking.hostName}.nix;
}