Fix for server config

This commit is contained in:
Nathan Anderson 2024-03-17 22:16:55 -06:00
parent d1facb3be7
commit f24abf52e2

View File

@ -33,45 +33,47 @@ in
./modules/user/main_user.nix
];
# Enable flakes feature
nix.settings.experimental-features = [
"nix-command" "flakes"
];
config = {
# Enable flakes feature
nix.settings.experimental-features = [
"nix-command" "flakes"
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking = {
hostId = srvConfig.hostId;
hostName = srvConfig.hostName; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networkmanager.enable = true; # Easiest to use and most distros use this by default.
};
networking = {
hostId = srvConfig.hostId;
hostName = srvConfig.hostName; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networkmanager.enable = true; # Easiest to use and most distros use this by default.
};
time.timeZone = timeZone;
time.timeZone = timeZone;
main_user = {
enable = true;
userName = srvConfig.userName;
isDesktopUser = false;
main_user = {
enable = true;
userName = srvConfig.userName;
isDesktopUser = false;
};
services.openssh = lib.mkIf srvConfig.sshEnable {
enable = true;
};
services.nfs.server = lib.mkIf srvConfig.nfsEnable {
enable = true;
exports = ''
/nfs_export 1192.168.1.149(rw,fsid=0,no_subtree_check)
'';
};
networking.firewall.allowedTCPPorts = [ 2049 ];
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
system.stateVersion = "23.11"; # Did you read the comment?
};
services.openssh = lib.mkIf srvConfig.sshEnable {
enable = true;
};
services.nfs.server = lib.mkIf srvConfig.nfsEnable {
enable = true;
exports = ''
/nfs_export 1192.168.1.149(rw,fsid=0,no_subtree_check)
'';
};
networking.firewall.allowedTCPPorts = [ 2049 ];
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
system.stateVersion = "23.11"; # Did you read the comment?
}