tangled
alpha
login
or
join now
dunkirk.sh
/
dots
3
fork
atom
Kieran's opinionated (and probably slightly dumb) nix config
3
fork
atom
overview
issues
pulls
pipelines
chore: fix cedarlogic
dunkirk.sh
1 week ago
d543b8c9
c4fe3a9e
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+6
-6
1 changed file
expand all
collapse all
unified
split
modules
nixos
services
cedarlogic.nix
+6
-6
modules/nixos/services/cedarlogic.nix
···
66
66
systemd.services.cedarlogic.preStart = lib.mkAfter ''
67
67
cd ${webDir}
68
68
69
69
-
if [ -f package.json ]; then
69
69
+
# First start: install deps, parse gates, and build client
70
70
+
if [ -f package.json ] && [ ! -d node_modules ]; then
70
71
${pkgs.unstable.bun}/bin/bun install
72
72
+
${pkgs.unstable.bun}/bin/bun run parse-gates
73
73
+
${pkgs.unstable.bun}/bin/bun run build
71
74
fi
72
75
73
73
-
# Generate gate definitions from XML
74
74
-
${pkgs.unstable.bun}/bin/bun run parse-gates
75
75
-
76
76
-
# Build client (Vite)
77
77
-
${pkgs.unstable.bun}/bin/bun run build
76
76
+
# Ensure Caddy can read static files
77
77
+
chmod -R g+rX ${webDir}/dist 2>/dev/null || true
78
78
'';
79
79
80
80
# Caddy - path-based routing to 3 backends + static file serving