fix(#1845): correct ProtectSystem=strict comment (nix called directly via NIX_REMOTE=daemon)

This commit is contained in:
atlas 2026-07-04 13:23:56 +02:00 committed by mara
commit 467d3fa82e

View file

@ -1106,13 +1106,16 @@ in
ProtectHome = true; # HOME = /var/lib/hyperhive; no /home/* access needed
# "strict" makes the entire filesystem read-only except for
# StateDirectory (/var/lib/hyperhive) and RuntimeDirectory
# (/run/hyperhive), which systemd keeps writable. hive-c0re
# never writes to /usr, /etc, /boot, /run (other than its own
# RuntimeDirectory), or /nix — all /etc writes go through
# hive-priv, /etc/hyperhive/serve.json is read-only at startup,
# and the service never calls nix directly (builds delegate to
# hive-priv via the privileged socket). No ReadWritePaths needed
# beyond the managed directories.
# (/run/hyperhive), which systemd keeps writable. No
# ReadWritePaths needed beyond the managed directories because:
# - nix is invoked directly (lifecycle, meta, flake_check), but
# NIX_REMOTE=daemon routes all store writes through the host
# daemon — hive-c0re never writes to /nix itself.
# - flake.lock ops land in the meta worktree under StateDirectory
# (kept writable by systemd).
# - nix build worktrees live in PrivateTmp, not /tmp.
# - /etc writes (bind-mount edits) go through hive-priv via the
# privileged socket; /etc/hyperhive/serve.json is read-only.
ProtectSystem = "strict";
ProtectKernelTunables = true; # no sysctl writes
ProtectKernelLogs = true; # reads logs via systemd-journal group, not /dev/kmsg