2024-07-29 23:09:42 -05:00
|
|
|
|
{
|
2024-09-07 00:52:43 -05:00
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
userName,
|
2024-07-29 23:09:42 -05:00
|
|
|
|
hostname,
|
|
|
|
|
...
|
|
|
|
|
} @ args:
|
|
|
|
|
#############################################################
|
|
|
|
|
#
|
|
|
|
|
# Host & Users configuration
|
|
|
|
|
#
|
|
|
|
|
#############################################################
|
|
|
|
|
{
|
|
|
|
|
networking.hostName = hostname;
|
|
|
|
|
networking.computerName = hostname;
|
|
|
|
|
system.defaults.smb.NetBIOSName = hostname;
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
2024-09-07 00:52:43 -05:00
|
|
|
|
users.users."${userName}" = {
|
|
|
|
|
home =
|
|
|
|
|
if pkgs.stdenv.isDarwin
|
|
|
|
|
then "/Users/${userName}"
|
|
|
|
|
else "/home/${userName}";
|
|
|
|
|
description = userName;
|
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
|
|
|
|
}
|