nix-config-v2/modules/host-users.nix
2024-09-07 23:20:24 -04:00

28 lines
770 B
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
pkgs,
userName,
hostname,
...
} @ args: {
# Set up networking configuration
networking.hostName = hostname;
networking.computerName = hostname;
# networking.firewall.enable = true; # VERY important, do not touch
# networking.firewall.allowedTCPPorts = [];
# networking.firewall.allowedUDPPorts = [];
# networking.networkmanager.enable = pkgs.stdenv.isLinux; # Linux tool for managing network connections
system.defaults.smb.NetBIOSName = hostname;
# Set up user accounts
# 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];
}