{ config, pkgs, registry, ... }: # pikachu — AZW ME Pro server. # Disk layout is in ./disk.nix. # `fileSystems` for the root disk are derived from it. { imports = [ ./hardware-configuration.nix ./disk.nix ]; hardware.cpu.intel.updateMicrocode = true; modules.network.vlans = { interface = "enp2s0"; ids = [ 20 ]; }; boot.zfs.forceImportRoot = false; modules.host.zfs = { enable = true; pools.pikachu = { }; }; registry.address.pikachu.self = "10.23.10.102"; guests.valheim = { enable = true; vlan = 20; address = "10.23.20.197"; steamPath = "/pikachu/data/steamcmd"; installPath = "/pikachu/data/servers/valheim/main"; statePath = "/pikachu/media/games/servers/valheim/main"; serverName = "main"; reverseProxy = { enable = true; route = { domain = "valheim.alexion.dev"; protocol = "udp"; ports = [ config.guests.valheim.port (config.guests.valheim.port + 1) ]; }; }; }; guests.palworld = { enable = true; vlan = 20; address = "10.23.20.250"; steamPath = "/pikachu/data/steamcmd"; installPath = "/pikachu/data/servers/palworld/tracion"; statePath = "/pikachu/media/games/servers/palworld/tracion"; serverName = "Tracion"; autoStart = false; adminPasswordSecret = "services/game-servers/admin/password"; reverseProxy = { enable = true; route = { domain = "palworld.alexion.dev"; protocol = "udp"; ports = [ config.guests.palworld.port ]; }; }; }; guests.navidrome = { enable = true; vlan = 20; mac = "BC:24:11:C9:17:83"; dataPath = "/pikachu/data/navidrome"; libraryPath = "/pikachu/media/music"; address = "10.23.20.43"; reverseProxy = { enable = true; route = { domain = "music.alexion.dev"; protocol = "https"; port = 4533; }; }; }; guests.reverse-proxy = { enable = true; vlan = 20; mac = "02:98:64:5a:07:4f"; address = "10.23.20.109"; }; guests.homepage = { enable = true; vlan = 20; address = "10.23.20.110"; reverseProxy = { enable = true; route = { domain = "home"; protocol = "http"; port = 8082; }; }; }; guests.copyparty = { enable = true; vlan = 20; mac = "02:23:20:39:23:01"; statePath = "/pikachu/data/copyparty"; address = "10.23.20.126"; reverseProxy = { enable = true; route = { domain = "files.alexion.dev"; protocol = "https"; port = 3923; clientMaxBodySize = "1g"; }; trustedSources = [ "${registry.address.${config.networking.hostName}."reverse-proxy"}/32" ]; }; volumes = { "/" = { hostPath = "/pikachu/data/copyparty/root"; path = "/srv"; readOnly = true; }; "/inbox" = { hostPath = "/pikachu/__inbox"; path = "/pikachu/__inbox"; }; "/media" = { hostPath = "/pikachu/media"; path = "/pikachu/media"; }; "/opds" = { hostPath = "/pikachu/data/opds"; path = "/pikachu/data/opds"; readOnly = true; flags.opds = true; }; }; }; environment.systemPackages = with pkgs; [ pciutils smartmontools usbutils ]; }