my nix flake.

update ivy

vt3e.cat ea3436b1 dc0f9bc9

verified
+124 -9
+19
hosts/ivy/caddy.nix
··· 21 21 reverse_proxy localhost:8082 22 22 ''; 23 23 }; 24 + 25 + "bbell.vt3e.cat" = { 26 + extraConfig = '' 27 + encode zstd gzip 28 + root * /var/www/bbell 29 + try_files {path} /index.html 30 + file_server 31 + ''; 32 + }; 33 + 34 + "http://localhost:9005" = { 35 + extraConfig = '' 36 + encode zstd gzip 37 + root * /home/willow/web 38 + try_files {path} /index.txt 39 + file_server 40 + ''; 41 + }; 42 + 24 43 }; 25 44 26 45 globalConfig = ''
+6
hosts/ivy/default.nix
··· 39 39 }; 40 40 }; 41 41 42 + nix.settings.trusted-users = [ 43 + "root" 44 + "@wheel" 45 + "willow" 46 + ]; 47 + 42 48 boot = { 43 49 loader = { 44 50 systemd-boot.enable = true;
+90 -2
hosts/ivy/services/ddns.nix
··· 1 + { pkgs, config, ... }: 2 + 3 + let 4 + src = pkgs.fetchgit { 5 + url = "https://tangled.org/wlo.moe/ddns-updater.git"; 6 + hash = "sha256-WbmfGHiJ+8d82qlkJo97yKra6weTh4HuDSIQVHCiiRQ="; 7 + }; 8 + 9 + node_modules = pkgs.stdenv.mkDerivation { 10 + pname = "ddns-updater-modules"; 11 + version = "1.0.1"; 12 + inherit src; 13 + 14 + nativeBuildInputs = [ pkgs.bun ]; 15 + 16 + outputHashAlgo = "sha256"; 17 + outputHashMode = "recursive"; 18 + outputHash = "sha256-kcCJbrtEbFu1nt04gvEYet3HZtQSnS6jYyU61cVRSbQ=="; 19 + 20 + dontConfigure = true; 21 + dontFixup = true; 22 + dontPatchShebangs = true; 23 + 24 + buildPhase = '' 25 + export HOME=$(mktemp -d) 26 + bun install --no-progress --frozen-lockfile 27 + ''; 28 + 29 + installPhase = '' 30 + mkdir -p $out 31 + cp -r node_modules/. $out/ 32 + ''; 33 + }; 34 + 35 + ddns-updater = pkgs.stdenv.mkDerivation { 36 + pname = "ddns-updater"; 37 + version = "1.0.1"; 38 + inherit src; 39 + 40 + nativeBuildInputs = [ pkgs.bun ]; 41 + dontStrip = true; 42 + 43 + buildPhase = '' 44 + runHook preBuild 45 + export HOME=$(mktemp -d) 46 + 47 + cp -r ${node_modules} node_modules 48 + chmod -R +w node_modules 49 + 50 + bun build src/bin.ts --outfile=ddns --compile 51 + runHook postBuild 52 + ''; 53 + 54 + installPhase = '' 55 + runHook preInstall 56 + mkdir -p $out/bin 57 + cp ddns $out/bin/ddns 58 + runHook postInstall 59 + ''; 60 + }; 61 + 62 + in 1 63 { 2 - services.ddns-updater = { 3 - enable = true; 64 + systemd.services.ddns-updater = { 65 + description = "ddns updater"; 66 + after = [ "network-online.target" ]; 67 + wants = [ "network-online.target" ]; 68 + wantedBy = [ "multi-user.target" ]; 69 + 70 + serviceConfig = { 71 + Type = "oneshot"; 72 + ExecStart = "${ddns-updater}/bin/ddns --config /var/lib/secrets/ddns.json"; 73 + 74 + DynamicUser = true; 75 + ProtectSystem = "strict"; 76 + ProtectHome = true; 77 + BindReadOnlyPaths = [ "/var/lib/secrets/ddns.json" ]; 78 + 79 + StateDirectory = "ddns-updater"; 80 + Environment = "HOME=%S/ddns-updater"; 81 + }; 82 + }; 83 + 84 + systemd.timers.ddns-updater = { 85 + description = "ddns updater every five minutes"; 86 + wantedBy = [ "timers.target" ]; 87 + timerConfig = { 88 + OnBootSec = "1m"; 89 + OnUnitActiveSec = "5m"; 90 + Unit = "ddns-updater.service"; 91 + }; 4 92 }; 5 93 }
+9 -7
hosts/ivy/services/pds.nix
··· 28 28 respond `{ "lastInitiatedAt": "2025-07-14T14:22:43.912Z", "status": "assured" }` 200 29 29 } 30 30 31 - @backend { 32 - path /xrpc/* /.well-known/* /robots.txt /oauth/* /@* 33 - } 34 31 35 - handle @backend { 36 - reverse_proxy localhost:8090 32 + @static { 33 + path / /assets/* /index.html /posts /profile/* 37 34 } 38 35 39 - handle { 40 - reverse_proxy localhost:8090 36 + handle @static { 37 + root * /var/www/pds.wlo.moe/ 38 + file_server 39 + try_files {path} /index.html 41 40 } 41 + 42 + reverse_proxy localhost:8090 43 + 42 44 ''; 43 45 }; 44 46 }