From f24abf52e2ec1e55dbe01acf21446e82ed42157a Mon Sep 17 00:00:00 2001 From: Nathan Anderson Date: Sun, 17 Mar 2024 22:16:55 -0600 Subject: [PATCH] Fix for server config --- shared/server-configuration.nix | 74 +++++++++++++++++---------------- 1 file changed, 38 insertions(+), 36 deletions(-) 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? }