29 lines
629 B
Nix
29 lines
629 B
Nix
{
|
||
lib,
|
||
pkgs,
|
||
userName,
|
||
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’.
|
||
users.users."${userName}" = {
|
||
home =
|
||
if pkgs.stdenv.isDarwin
|
||
then "/Users/${userName}"
|
||
else "/home/${userName}";
|
||
description = userName;
|
||
};
|
||
|
||
nix.settings.trusted-users = [userName];
|
||
}
|