Add Website #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "website"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add vanhouzen.me website
Replaces the placeholder
"Hello, World!"Caddy response forvanhouzen.mewith the actualvanhouzen-siteservice, served over a Unix domain socket.Changes
flake.nix/flake.lock— Addsvanhouzen-siteas a flake input, sourced fromcode.vanhouzen.me/cameron/website, withnixpkgsandflake-partsfollowing the root flake's inputs.vanhouzen/configuration.nix— Imports the newwebsite.nixmodule and removes the old placeholder Caddy virtual host config.vanhouzen/website.nix— New module that:vanhouzen-sitegroup and addscaddyto it so Caddy can access the socket.systemd-tmpfilesto pre-create/run/vanhouzen-sitewith correct ownership before socket activation, avoiding a race condition where Caddy couldn't traverse a root-owned directory on first boot.vanhouzen-siteNixOS service.vanhouzen.meto the service's Unix socket at/run/vanhouzen-site/site.sock.Notes
The
tmpfiles.drule is required becauseRuntimeDirectoryonly fixes ownership once the service starts, which is too late for socket-activated units — Caddy can receive a request before the service process is up. Runningtmpfiles.dbeforesockets.targetensures the directory is correctly owned from the start.f4b6dfc6a4todd48e4ce17