From 1d19d091e6055c33a41e000ec7430e9311480e3c Mon Sep 17 00:00:00 2001 From: yukkop Date: Sun, 13 Sep 2026 09:37:22 +0000 Subject: [PATCH] refactor: reCapcha -> turnstile --- nixos/module/hectic/service/immich.nix | 2 +- .../module/hectic/service/project-zomboid.nix | 21 +++++++++++-------- nixos/system/hectic-lab/hectic-lab.nix | 10 +++++++++ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/nixos/module/hectic/service/immich.nix b/nixos/module/hectic/service/immich.nix index 82ec4315..8258556f 100644 --- a/nixos/module/hectic/service/immich.nix +++ b/nixos/module/hectic/service/immich.nix @@ -161,7 +161,7 @@ in "prefixpath=${cfg.storageBox.subdirectory}"; }; - systemd.services.immich-server.serviceConfig.RequiresMountsFor = lib.mkIf cfg.storageBox.enable [ + systemd.services.immich-server.unitConfig.RequiresMountsFor = lib.mkIf cfg.storageBox.enable [ cfg.mediaLocation ]; }; diff --git a/nixos/module/hectic/service/project-zomboid.nix b/nixos/module/hectic/service/project-zomboid.nix index 35ae42cb..c9793d12 100644 --- a/nixos/module/hectic/service/project-zomboid.nix +++ b/nixos/module/hectic/service/project-zomboid.nix @@ -16,15 +16,24 @@ name: value: "${name}=${if builtins.isBool value then lib.boolToString value else toString value}" ) serverProperties; + sandboxValueType = lib.types.oneOf [ + lib.types.bool + lib.types.int + lib.types.float + lib.types.str + (lib.types.attrsOf sandboxValueType) + ]; luaValue = value: if builtins.isBool value then lib.boolToString value - else if builtins.isInt value then + else if builtins.isInt value || builtins.isFloat value then toString value + else if builtins.isAttrs value then + "{ ${lib.concatStringsSep " " (lib.mapAttrsToList (name: child: "[${luaValue name}] = ${luaValue child},") value)} }" else "\"${lib.replaceStrings [ "\\" "\"" "\n" "\r" ] [ "\\\\" "\\\"" "\\n" "\\r" ] value}\""; sandboxConfigLines = lib.mapAttrsToList ( - name: value: "${name} = ${luaValue value}," + name: value: "[${luaValue name}] = ${luaValue value}," ) cfg.sandboxProperties; zomboidDir = "${cfg.dataDir}/Zomboid"; adminPasswordFile = "${cfg.dataDir}/admin-password"; @@ -112,13 +121,7 @@ in { }; sandboxProperties = lib.mkOption { - type = lib.types.attrsOf ( - lib.types.oneOf [ - lib.types.bool - lib.types.int - lib.types.str - ] - ); + type = lib.types.attrsOf sandboxValueType; default = { }; description = "Values for the Project Zomboid SandboxVars.lua file."; }; diff --git a/nixos/system/hectic-lab/hectic-lab.nix b/nixos/system/hectic-lab/hectic-lab.nix index ab374867..9c12d28c 100644 --- a/nixos/system/hectic-lab/hectic-lab.nix +++ b/nixos/system/hectic-lab/hectic-lab.nix @@ -100,10 +100,20 @@ in { Map = "map_distanciado;Muldraugh, KY"; DoLuaChecksum = false; Public = true; + AntiCheatPermission = 3; }; sandboxProperties = { StartMonth = 12; StartDay = 1; + WaterShut = 3; + WaterShutModifier = 60; + ElecShut = 3; + ElecShutModifier = 60; + MinutesPerPage = 0.5; + ZombieLore = { + Transmission = 4; + Mortality = 7; + }; }; workshopItems = [ "2210760610" # Cryogenic Winter +Easy/Hard Modes