cleanup
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -74,7 +74,7 @@ in
|
||||
service_configs.ports.https
|
||||
|
||||
# http (but really acmeCA challenges)
|
||||
80
|
||||
service_configs.ports.http
|
||||
];
|
||||
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -14,6 +14,9 @@ let
|
||||
https = {
|
||||
domain = "test.local";
|
||||
};
|
||||
ports = {
|
||||
minecraft = 25565;
|
||||
};
|
||||
zpool_ssds = "";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user