diff --git a/shared/server-configuration.nix b/shared/server-configuration.nix index 5c34012..60adf57 100644 --- a/shared/server-configuration.nix +++ b/shared/server-configuration.nix @@ -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? }