2024-07-29 23:09:42 -05:00
|
|
|
|
{
|
2024-11-05 18:46:59 -06:00
|
|
|
|
lib,
|
2024-09-07 00:52:43 -05:00
|
|
|
|
pkgs,
|
|
|
|
|
userName,
|
2024-07-29 23:09:42 -05:00
|
|
|
|
hostname,
|
|
|
|
|
...
|
2024-09-07 21:22:12 -05:00
|
|
|
|
} @ args: {
|
|
|
|
|
# Set up networking configuration
|
2024-07-29 23:09:42 -05:00
|
|
|
|
networking.hostName = hostname;
|
2024-09-09 08:27:52 -05:00
|
|
|
|
# networking.computerName = hostname;
|
2024-09-07 22:20:24 -05:00
|
|
|
|
# networking.firewall.enable = true; # VERY important, do not touch
|
2024-09-07 21:22:12 -05:00
|
|
|
|
# networking.firewall.allowedTCPPorts = [];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [];
|
2024-09-07 22:20:24 -05:00
|
|
|
|
# networking.networkmanager.enable = pkgs.stdenv.isLinux; # Linux tool for managing network connections
|
2024-09-09 08:27:52 -05:00
|
|
|
|
# system.defaults.smb.NetBIOSName = hostname;
|
2024-07-29 23:09:42 -05:00
|
|
|
|
|
2024-09-07 21:22:12 -05:00
|
|
|
|
# Set up user accounts
|
|
|
|
|
# Don't forget to set a password with ‘passwd’!
|
2024-11-05 18:46:59 -06:00
|
|
|
|
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;
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2024-09-09 08:27:52 -05:00
|
|
|
|
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
|
|
|
|
}
|