diff --git a/modules/nixos/services/jellyfin/default.nix b/modules/nixos/services/jellyfin/default.nix index 4edf8c0..777c1dd 100755 --- a/modules/nixos/services/jellyfin/default.nix +++ b/modules/nixos/services/jellyfin/default.nix @@ -149,10 +149,8 @@ in users.users.caddy.extraGroups = [ "acme" ]; systemd.tmpfiles.rules = [ - # Create directories with 777 permissions so the jellyfin user (UID 999) inside the VM can write - # VirtioFS preserves host permissions, and we can't easily match UIDs between host and guest - "d ${serviceCfg.mntPaths.path0} 0777 root root -" - "d ${serviceCfg.mntPaths.path0}/cache 0777 root root -" + "d ${serviceCfg.mntPaths.path0} 0755 999 999 -" + "d ${serviceCfg.mntPaths.path0}/cache 0755 999 999 -" ]; } diff --git a/modules/nixos/services/template/default.nix b/modules/nixos/services/template/default.nix index ca729b7..82f1ba2 100755 --- a/modules/nixos/services/template/default.nix +++ b/modules/nixos/services/template/default.nix @@ -18,32 +18,32 @@ # ┌────────────────────────────────────────────────┐ # │ Host (NixOS Server) │ # │ │ -# │ ┌──────────────┐ ┌──────────────┐ │ -# │ │ Caddy │ │ br-vms │ │ -# │ │ (Reverse │──────│ Bridge │ │ -# │ │ Proxy) │ │ 192.168.50 │ │ -# │ │ TLS Term │ │ .240 │ │ -# │ └──────────────┘ └──────┬───────┘ │ -# │ :443 │ │ -# │ │ ┌─────▼──────┐ │ -# │ │ │ vm-NAME │ │ -# │ │ │ (TAP) │ │ -# │ │ └─────┬──────┘ │ -# │ │ │ │ -# │ ┌─────▼──────────────────────▼────────────┐ │ -# │ │ │ │ -# │ │ MicroVM Guest │ │ -# │ │ ┌────────────┐ ┌────────────┐ │ │ -# │ │ │ Service │ │ enp0s5 │ │ │ -# │ │ │ :PORT │ │192.168.50 │ │ │ -# │ │ │ │ │ .1XX │ │ │ -# │ │ └────────────┘ └────────────┘ │ │ -# │ │ │ │ -# │ │ VirtioFS Mounts: │ │ -# │ │ • /nix/.ro-store → Host /nix/store │ │ -# │ │ • /var/lib/NAME → Host /mnt/storage │ │ -# │ │ • /run/secrets → Host /run/secrets/NAME│ │ -# │ └─────────────────────────────────────────┘ │ +# │ ┌──────────────┐ ┌──────────────┐ │ +# │ │ Caddy │ │ br-vms │ │ +# │ │ (Reverse │──────│ Bridge │ │ +# │ │ Proxy) │ │ 192.168.50 │ │ +# │ │ TLS Term │ │ .240 │ │ +# │ └──────────────┘ └──────┬───────┘ │ +# │ :443 │ │ +# │ │ ┌─────▼──────┐ │ +# │ │ │ vm-NAME │ │ +# │ │ │ (TAP) │ │ +# │ │ └─────┬──────┘ │ +# │ │ │ │ +# │ ┌─────▼──────────────────────▼────────────┐ │ +# │ │ │ │ +# │ │ MicroVM Guest │ │ +# │ │ ┌────────────┐ ┌────────────┐ │ │ +# │ │ │ Service │ │ enp0s5 │ │ │ +# │ │ │ :PORT │ │192.168.50 │ │ │ +# │ │ │ │ │ .1XX │ │ │ +# │ │ └────────────┘ └────────────┘ │ │ +# │ │ │ │ +# │ │ VirtioFS Mounts: │ │ +# │ │ • /nix/.ro-store → Host /nix/store │ │ +# │ │ • /var/lib/NAME → Host /mnt/storage │ │ +# │ │ • /run/secrets → Host /run/secrets/NAME│ │ +# │ └─────────────────────────────────────────┘ │ # │ │ # └────────────────────────────────────────────────┘ #