diff --git a/nixos-infect b/nixos-infect index 9cafdd8..b7705f2 100755 --- a/nixos-infect +++ b/nixos-infect @@ -42,6 +42,7 @@ makeConf() { $network_import $NIXOS_IMPORT ./files.nix + ./users.nix ./mailserver/system/mailserver.nix ./mailserver/system/alps.nix ./vpn/ocserv.nix @@ -92,7 +93,7 @@ makeConf() { }; system.autoUpgrade.enable = true; system.autoUpgrade.allowReboot = false; - system.autoUpgrade.channel = https://nixos.org/channels/nixos-20.09-small; + system.autoUpgrade.channel = https://nixos.org/channels/nixos-21.05-small; nix = { optimise.automatic = true; gc = { @@ -115,13 +116,6 @@ makeConf() { enable = true; }; }; - users.mutableUsers = false; - users.users = { - "$LUSER" = { - isNormalUser = true; - hashedPassword = "$HASHED_PASSWORD"; - }; - }; } EOF # If you rerun this later, be sure to prune the filesSystems attr @@ -173,6 +167,23 @@ EOF "f /var/cloudflareCredentials.ini 0440 nginx acmerecievers - \${cloudflareCredentials}" ]; } +EOF + + cat > /etc/nixos/users.nix << EOF +{ pkgs, ... }: +{ + users.mutableUsers = false; + users = { + users = { + #begin + "$LUSER" = { + isNormalUser = true; + hashedPassword = "$HASHED_PASSWORD"; + }; + #end + }; + }; +} EOF cat > /etc/nixos/mailserver/system/mailserver.nix << EOF