This commit is contained in:
2026-01-23 00:29:24 -05:00
parent a766e67fec
commit 47cc12f4ed
5 changed files with 13 additions and 5 deletions

View File

@@ -100,7 +100,10 @@
music_dir = "/${zpool_ssds}/music";
media_group = "media";
cpu_arch = "znver3";
ports = {
http = 80;
https = 443;
jellyfin = 8096; # no services.jellyfin option for this
torrent = 6011;
@@ -114,6 +117,7 @@
syncthing_gui = 8384;
syncthing_protocol = 22000;
syncthing_discovery = 21027;
minecraft = 25565;
};
https = {
@@ -175,7 +179,7 @@
targetPlatform = system;
buildPlatform = builtins.currentSystem;
};
lib = import ./modules/lib.nix { inherit inputs pkgs; };
lib = import ./modules/lib.nix { inherit inputs pkgs service_configs; };
in
{
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;

View File

@@ -1,6 +1,7 @@
{
inputs,
pkgs,
service_configs,
...
}:
inputs.nixpkgs.lib.extend (
@@ -28,8 +29,8 @@ inputs.nixpkgs.lib.extend (
pkg:
final.optimizeWithFlags pkg [
"-O3"
"-march=znver3"
"-mtune=znver3"
"-march=${service_configs.cpu_arch}"
"-mtune=${service_configs.cpu_arch}"
];
vpnNamespaceOpenPort =

View File

@@ -74,7 +74,7 @@ in
service_configs.ports.https
# http (but really acmeCA challenges)
80
service_configs.ports.http
];
networking.firewall.allowedUDPPorts = [

View File

@@ -34,7 +34,7 @@
"-Xmx${heap_size} -Xms${heap_size} -XX:+UseZGC -XX:+ZGenerational";
serverProperties = {
server-port = 25565;
server-port = service_configs.ports.minecraft;
enforce-whitelist = true;
gamemode = "survival";
white-list = true;

View File

@@ -14,6 +14,9 @@ let
https = {
domain = "test.local";
};
ports = {
minecraft = 25565;
};
zpool_ssds = "";
};