adding math user

This commit is contained in:
2025-08-06 21:36:38 -04:00
parent c20b6d1da2
commit f0eee80c2d
11 changed files with 205 additions and 0 deletions

52
users/math/default.nix Normal file
View File

@@ -0,0 +1,52 @@
{
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 AAAAC3NzaC1lZDI1NTE5AAAAIJYZFsc9CSH03ZUP7y81AHwSyjLwFmcshVFCyxDcYhBT rhapsody-in-green" # 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;
}