172 lines
3.7 KiB
Nix
172 lines
3.7 KiB
Nix
{
|
|
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";
|
|
publicIP = config.guests.palworld.address;
|
|
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";
|
|
access.r = [ "alexion" ];
|
|
readOnly = true;
|
|
};
|
|
"/inbox" = {
|
|
hostPath = "/pikachu/__inbox";
|
|
path = "/pikachu/__inbox";
|
|
access.A = [ "alexion" ];
|
|
flags = [
|
|
"d2d"
|
|
"d2t"
|
|
"dthumb"
|
|
];
|
|
};
|
|
"/media" = {
|
|
hostPath = "/pikachu/media";
|
|
path = "/pikachu/media";
|
|
access.A = [ "alexion" ];
|
|
flags = [
|
|
"d2d"
|
|
"d2t"
|
|
"dthumb"
|
|
];
|
|
};
|
|
"/opds" = {
|
|
hostPath = "/pikachu/data/opds";
|
|
path = "/pikachu/data/opds";
|
|
access.r = [ "alexion" ];
|
|
readOnly = true;
|
|
flags = [ "opds" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
pciutils
|
|
smartmontools
|
|
usbutils
|
|
];
|
|
|
|
}
|