nix-config-v2/modules/common/users.nix

30 lines
528 B
Nix
Raw Normal View History

2024-07-29 23:09:42 -05:00
{
lib,
2024-09-07 00:52:43 -05:00
pkgs,
userName,
2024-07-29 23:09:42 -05:00
hostname,
...
} @ args: {
2024-07-29 23:09:42 -05:00
networking.hostName = hostname;
# Don't forget to set a password with passwd!
users.users."${userName}" = lib.mkMerge [
{
home =
if pkgs.stdenv.isDarwin
then "/Users/${userName}"
else "/home/${userName}";
description = userName;
}
(lib.mkIf (pkgs.stdenv.isLinux) {
group = "${userName}";
isNormalUser = true;
})
];
users.groups.wyatt = {};
2024-07-29 23:09:42 -05:00
2024-09-07 00:52:43 -05:00
nix.settings.trusted-users = [userName];
2024-07-29 23:09:42 -05:00
}