home-lab/modules/network
Geir Okkenhaug Jerstad c392df4a93 Add ZFS support to sleeper-service
- Replace ext4 with ZFS pool 'filepool' for enhanced data integrity
- Add ZFS auto-scrub and TRIM services for file server
- Configure proper ZFS datasets: root, nix, var, storage
- Add networking hostId (a1b2c3d4) required for ZFS
- Update NFS and Transmission to use ZFS mount points
- Change file ownership to 'sma' user for server configuration
- Add comprehensive ZFS setup documentation

Ready for deployment with proper file server storage backend.
2025-06-05 17:16:32 +02:00
..
common.nix Restructure networking configuration to per-machine modules 2025-06-05 14:54:27 +02:00
network-congenital-optimist.nix Clean up networking configuration structure 2025-06-05 15:08:22 +02:00
network-sleeper-service.nix Add ZFS support to sleeper-service 2025-06-05 17:16:32 +02:00
README.md feat: Complete sleeper-service systemd-networkd configuration 2025-06-05 15:44:07 +02:00

Network Configuration Modules

This directory contains networking configurations for all machines in the Home Lab.

Structure

  • common.nix - Shared networking settings used by all machines

    • nftables firewall enabled
    • SSH access with secure defaults
    • Tailscale VPN for remote access
    • Basic firewall rules (SSH port 22)
  • network-<machine-name>.nix - Machine-specific networking configurations

    • Import common.nix for shared settings
    • Override or extend with machine-specific requirements
    • Define hostname, hostId, and additional firewall ports

Current Machines

network-congenital-optimist.nix

  • AMD Threadripper workstation
  • ZFS hostId configuration (8425e349)
  • Ready for additional service ports as needed

network-sleeper-service.nix

  • Xeon file server
  • Headless server configuration
  • Ready for additional file sharing service ports

Usage

Each machine configuration imports its specific network module:

# In machines/<machine-name>/configuration.nix
imports = [
  ../../modules/network/network-<machine-name>.nix
  # ... other imports
];

Adding New Machines

  1. Create network-<new-machine>.nix in this directory
  2. Import ./common.nix for shared settings
  3. Add machine-specific configuration (hostname, hostId, ports)
  4. Import the new file in the machine's configuration.nix

Future Refactoring

The common.nix file can be extended to include more shared networking patterns as they emerge across machines. Consider moving repeated patterns here to reduce duplication.