mail: enrol the host in ymr.serviceSandbox (nix-config#932) #1965
No reviewers
Labels
No labels
backlog
bug
enhancement
in-progress
review
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ymrtech/nix-config!1965
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kb/NCFG-932-mail-sandbox"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Kanban card nix-config#932 (child of nix-config#928, split by the disjointness referee).
What
Enable
ymr.serviceSandboxon mail and enrol the units whose write paths weremeasured on the host (cutover from nix-config#896 §9 step 2; template = the vpn-mx
cutover, nix-config#909).
Measured on mail 2026-10-13 with
systemctl show <unit> -p ExecStart -p StateDirectory:/var/cache/vmagent(-remoteWrite.tmpDataPath)/var/lib/vlagent(tmpDataPath + file checkpoints)/var/lib/systemd/journal-upload(--save-state)prometheus-node-exportercarries the required per-host deltaSystemCallFilter = [ "@system-service" "@clock" ]— node_exporter'stimexcollector calls
adjtimex(2), which the module's default@system-serviceexcludes; without it every scrape dies with SIGSYS and the unit crash-loops
(measured on vpn-mx:
sig=31 syscall=171, NRestarts=16 in 13 min).postgres/dovecot/postfix/caddystay out (module exception register —mail + ingress writers need measured paths first, one host at a time); the CI runners
are excluded outright; grafana/listmonk/atticd are later cutovers.
The module's table is applied at
lib.mkOverride 1500, so each unit's own strongerdeclaration wins (the nixpkgs exporters already declare
ProtectSystem=strict,ProtectHome,PrivateTmp,NoNewPrivileges; vlagent declared none and now gainsthe full table).
DoD
systemctl show <unit>shows the table, every enrolledunit active with NRestarts=0,
/etc/fleet-service-sandbox.policypresent, and areal
/metricsscrape returns 200Offline evidence
nix eval .#nixosConfigurations.mail.config.ymr.serviceSandbox.enrolledUnits→ the six units above
nix eval .#nixosConfigurations.mail.config.systemd.services.<unit>.serviceConfig→ the hardening keys + ReadWritePaths
config.system.build.toplevel.drvPathevaluates (assertions pass)71d7c4746d5a09b36272