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

29 lines
629 B
Nix
Raw 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.

{
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];
}