From 0f4b0295c8afb5ba646de9b289c677ead09a24f6 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Tue, 12 Nov 2024 02:01:34 -0600 Subject: [PATCH] bert: add 0hats.com Future direction: Have a systemd timer that regens this automatically, and updates the index page accordingly. --- bert/services/http/0hats.com.nix | 20 ++++++++++++++++++++ bert/services/http/index.nix | 1 + 2 files changed, 21 insertions(+) create mode 100644 bert/services/http/0hats.com.nix diff --git a/bert/services/http/0hats.com.nix b/bert/services/http/0hats.com.nix new file mode 100644 index 0000000..809af75 --- /dev/null +++ b/bert/services/http/0hats.com.nix @@ -0,0 +1,20 @@ + +{ + services.caddy.virtualHosts."0hats.com" = { + serverAliases = ["www.0hats.com"]; + extraConfig = '' + encode zstd gzip + file_server + root * /srv/www/0hats.com + + handle_errors { + respond "{err.status_code} {err.status_text}" + } + ''; + }; + systemd.tmpfiles.settings."10-0hats-com" = { + "/srv/www/0hats.com" = { + d = {}; + }; + }; +} diff --git a/bert/services/http/index.nix b/bert/services/http/index.nix index 80976af..f85f0e7 100644 --- a/bert/services/http/index.nix +++ b/bert/services/http/index.nix @@ -1,5 +1,6 @@ { imports = [ + ./0hats.com.nix ./files.chandlerswift.com.nix ./git.chandlerswift.com.nix ./harborpaperco.com.nix