Commit 8d527c3b5fb3
Changed files (2)
systems
carthage
systems/carthage/extra.nix
@@ -384,6 +384,8 @@ in
# Flux — website generator (hourly)
systemd.tmpfiles.rules = [
"d /var/lib/flux 0755 vincent users -"
+ # Separate public notes; initially empty and maintained by vincent.
+ "d /var/lib/aniflow-notes 0755 vincent users -"
# Git directory permissions (for Caddy access to public repos)
"d /home/vincent 0711 vincent users -" # Allow traversal to git directory
"d /home/vincent/git 0700 vincent users -" # Private git directory
@@ -426,6 +428,21 @@ in
};
};
+ # Public, read-only notes. No writable folders, authentication, or comments.
+ systemd.services.aniflow = {
+ description = "Read-only public notes";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = "${pkgs.aniflow}/bin/aniflow /var/lib/aniflow-notes --host 127.0.0.1 --port 8099 --base /notes --allow-host vincent.demeester.fr --no-comments";
+ Restart = "on-failure";
+ ProtectSystem = "strict";
+ ProtectHome = true;
+ PrivateTmp = true;
+ NoNewPrivileges = true;
+ };
+ };
+
# Allow Caddy to access git repositories in vincent's home
users.users.caddy.extraGroups = [ "users" ];
@@ -1193,16 +1210,27 @@ in
${blockAIBotsSnippet}
${robotsTxtSnippet}
- root * /var/www/vincent.demeester.fr
+ # Keep bot and robots handlers ahead of both notes and the static site.
+ handle {
+ handle /notes {
+ redir * /notes/ 308
+ }
+ handle /notes/* {
+ reverse_proxy 127.0.0.1:8099
+ }
+ handle {
+ root * /var/www/vincent.demeester.fr
- # Try files with .html extension
- try_files {path} {path}.html {path}/ /index.html
+ # Try files with .html extension
+ try_files {path} {path}.html {path}/ /index.html
- file_server browse {
- hide .fancyindex README.md HEADER.md
+ file_server browse {
+ hide .fancyindex README.md HEADER.md
+ }
+
+ ${securityHeaders}
+ }
}
-
- ${securityHeaders}
'';
# Self-hosted git repositories (public only).
flake.lock
@@ -152,11 +152,11 @@
]
},
"locked": {
- "lastModified": 1795483164,
- "narHash": "sha256-yRbudPqMDqdEqMI+dSbd0cXYir0+lxv26uu0Ey61lCc=",
+ "lastModified": 1795516491,
+ "narHash": "sha256-a8vl8435jHq7rQ53D+zneTKR3fMJ9cVN6zr7hvTXndc=",
"owner": "vdemeester",
"repo": "chick-group",
- "rev": "055fa8bacd5e6c20b153baeb964b87ac2060181b",
+ "rev": "4756b4dc7428d26a748b9bdf8a9d4e0e9d9e7cc9",
"type": "github"
},
"original": {