Restructure networking configuration to per-machine modules
Some checks are pending
🏠 Home Lab CI/CD Pipeline / 🔍 Validate Configuration (push) Waiting to run
🏠 Home Lab CI/CD Pipeline / 🔨 Build Configurations (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 🔒 Security Audit (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 📚 Documentation & Modules (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 🔄 Update Dependencies (push) Waiting to run
🏠 Home Lab CI/CD Pipeline / 🚀 Deploy Configuration (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 📢 Notify Results (push) Blocked by required conditions

- Move networking configs to modules/network/ directory
- Create network-<machine-name>.nix files for each machine
- Add common.nix for shared networking configuration
- Update import paths in machine configurations
- Reduce duplication by using common networking settings

Network modules:
- modules/network/common.nix: Shared settings (nftables, SSH, tailscale)
- modules/network/network-congenital-optimist.nix: Workstation specific
- modules/network/network-sleeper-service.nix: File server specific
This commit is contained in:
Geir Okkenhaug Jerstad 2025-06-05 14:54:27 +02:00
parent a022b96189
commit 2940b85b60
7 changed files with 84 additions and 43 deletions

View file

@ -1,26 +0,0 @@
{ config, pkgs, ... }: {
# Network configuration
networking = {
hostName = "congenital-optimist";
hostId = "8425e349";
networkmanager.enable = true;
nftables.enable = true;
# Firewall configuration
firewall = {
enable = true;
allowedTCPPorts = [ 22 ];
allowedUDPPorts = [ 22 ];
};
};
# VPN and remote access
services.tailscale.enable = true;
services.openssh.enable = true;
# ZFS services
services.zfs = {
autoScrub.enable = true;
trim.enable = true;
};
}

View file

@ -0,0 +1,20 @@
{ config, pkgs, ... }:
{
services.transmission = {
enable = true;
user = "geir";
group = "users";
#home = "/mnt/storage/";
settings.rpc-port = 9091;
settings.rpc-bind-address = "0.0.0.0";
#openRPCPort = true;
downloadDirPermissions = "770";
settings = {
download-dir = "/mnt/storage";
#rpc-whitelist-enabled = true;
rpc-whitelist = "127.0.0.1,10.0.0.*,100.*.*.*";
rpc-host-whitelist = "congenital-optimist,localhost";
};
};
}