From 683e2128a5d00bcadea7cc2f71a48253032632a5 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 1 Dec 2026 00:51:48 +0000 Subject: enstate: the state directory is root's The receptor makes the state directory 0700 whoever created it (a deploy copying into incoming/, say), and the module has tmpfiles keep it so. --- nix/module.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nix') diff --git a/nix/module.nix b/nix/module.nix index d2f54c8..62f4222 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -323,6 +323,9 @@ in environment.etc."enstate/schema.json".source = schemaFile; environment.etc."enstate/config.json".source = settings; + # Root's, whatever creates it first (a deploy copying into incomingDir, say). + systemd.tmpfiles.rules = [ "d ${cfg.stateDir} 0700 root root -" ]; + # At boot, and after a switch that changes the schema: the views of this # generation, from the snapshots, and the reactions of those that changed. systemd.services.enstate = { -- cgit v1.3.1