Fix for server config
This commit is contained in:
parent
d1facb3be7
commit
f24abf52e2
|
@ -33,45 +33,47 @@ in
|
||||||
./modules/user/main_user.nix
|
./modules/user/main_user.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable flakes feature
|
config = {
|
||||||
nix.settings.experimental-features = [
|
# Enable flakes feature
|
||||||
"nix-command" "flakes"
|
nix.settings.experimental-features = [
|
||||||
];
|
"nix-command" "flakes"
|
||||||
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostId = srvConfig.hostId;
|
hostId = srvConfig.hostId;
|
||||||
hostName = srvConfig.hostName; # Define your hostname.
|
hostName = srvConfig.hostName; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = timeZone;
|
time.timeZone = timeZone;
|
||||||
|
|
||||||
main_user = {
|
main_user = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = srvConfig.userName;
|
userName = srvConfig.userName;
|
||||||
isDesktopUser = false;
|
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?
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user