From 05b81f93b74883a96143eb4c7a45e77960a19b02 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Thu, 5 Jun 2025 15:08:22 +0200 Subject: [PATCH] Clean up networking configuration structure - Remove leftover networking.nix files from machine directories - ZFS configuration moved to machine-specific configuration where it belongs - Network module now contains only networking-related configuration - Improved separation of concerns between network and machine configs --- .../congenital-optimist/configuration.nix | 6 +++- machines/congenital-optimist/networking.nix | 33 ------------------ machines/sleeper-service/networking.nix | 34 ------------------- .../network/network-congenital-optimist.nix | 5 --- 4 files changed, 5 insertions(+), 73 deletions(-) delete mode 100644 machines/congenital-optimist/networking.nix delete mode 100644 machines/sleeper-service/networking.nix diff --git a/machines/congenital-optimist/configuration.nix b/machines/congenital-optimist/configuration.nix index 649aefb..b511564 100644 --- a/machines/congenital-optimist/configuration.nix +++ b/machines/congenital-optimist/configuration.nix @@ -47,7 +47,11 @@ } ]; }; - +# ZFS services for this machine + services.zfs = { + autoScrub.enable = true; + trim.enable = true; + }; # Basic system configuration nixpkgs.config.allowUnfree = true; system.stateVersion = "23.11"; # DO NOT CHANGE - maintains data compatibility diff --git a/machines/congenital-optimist/networking.nix b/machines/congenital-optimist/networking.nix deleted file mode 100644 index 95c513d..0000000 --- a/machines/congenital-optimist/networking.nix +++ /dev/null @@ -1,33 +0,0 @@ -# Networking Configuration - congenital-optimist -# AMD Threadripper workstation network setup -{ config, pkgs, ... }: - -{ - # Network configuration - networking = { - hostName = "congenital-optimist"; - hostId = "8425e349"; - networkmanager.enable = true; - nftables.enable = true; - - # Firewall configuration for workstation - firewall = { - enable = true; - allowedTCPPorts = [ - 22 # SSH - 9091 # Transmission RPC - ]; - allowedUDPPorts = [ 22 ]; - }; - }; - - # VPN and remote access - services.tailscale.enable = true; - services.openssh.enable = true; - - # ZFS services for this machine - services.zfs = { - autoScrub.enable = true; - trim.enable = true; - }; -} diff --git a/machines/sleeper-service/networking.nix b/machines/sleeper-service/networking.nix deleted file mode 100644 index a2edee7..0000000 --- a/machines/sleeper-service/networking.nix +++ /dev/null @@ -1,34 +0,0 @@ -# Networking Configuration - sleeper-service -# Xeon file server network setup -{ config, pkgs, ... }: - -{ - # Network configuration - networking = { - hostName = "sleeper-service"; - networkmanager.enable = true; - nftables.enable = true; - - # Firewall configuration for file server - firewall = { - enable = true; - allowedTCPPorts = [ - 22 # SSH - # Add other ports as needed for file sharing services - ]; - allowedUDPPorts = [ ]; - }; - }; - - # VPN and remote access - services.tailscale.enable = true; - - # SSH configuration for headless server - services.openssh = { - enable = true; - settings = { - PermitRootLogin = "no"; - PasswordAuthentication = false; - }; - }; -} diff --git a/modules/network/network-congenital-optimist.nix b/modules/network/network-congenital-optimist.nix index 8932446..83fb677 100644 --- a/modules/network/network-congenital-optimist.nix +++ b/modules/network/network-congenital-optimist.nix @@ -18,9 +18,4 @@ ]; }; - # ZFS services for this machine - services.zfs = { - autoScrub.enable = true; - trim.enable = true; - }; }