mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
refactor(youko): link caddy's wallpapers with tmpfiles
A tmpfiles L+ symlink to the store path replaces the activation script that rsynced it on every switch. Files that were removed upstream no longer linger. Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
1 parent
5c9bb6f95f
commit
c8d8b17a27
1 file changed
+1
-7
@@ -1,6 +1,5 @@
|
||||
{
|
||||
mylib,
|
||||
pkgs,
|
||||
config,
|
||||
myvars,
|
||||
wallpapers,
|
||||
@@ -253,10 +252,5 @@ in
|
||||
# caddy is reached from the LAN/tailnet only; the shared firewall
|
||||
# (modules/nixos/base/networking/firewall.nix) already trusts those.
|
||||
|
||||
# Serve the wallpapers from the file server. `mkdir -p` here covers the
|
||||
# whole fileserver tree; caddy's dataDir itself is created by the module.
|
||||
system.activationScripts.installCaddyWallpapers = ''
|
||||
mkdir -p /var/lib/caddy/fileserver/wallpapers
|
||||
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F644 ${wallpapers}/ /var/lib/caddy/fileserver/wallpapers/
|
||||
'';
|
||||
systemd.tmpfiles.rules = [ "L+ /var/lib/caddy/fileserver/wallpapers - - - - ${wallpapers}" ];
|
||||
}
|
||||
Reference in new issue
Block a user