aboutsummaryrefslogtreecommitdiffstats
path: root/nix/module.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-01 00:51:48 +0000
committertv <tv@krebsco.de>2026-12-01 00:51:48 +0000
commit54f070ef0f905f867a24dece72f667be23f9f843 (patch)
tree6f6258ebfa3bb0532ad3abbbeefc5a550dc4d2cf /nix/module.nix
parent683e2128a5d00bcadea7cc2f71a48253032632a5 (diff)
enstate: --apply starts the unit that runs --migrate again if it failed
The setting unit names it (the module: enstate.service). After a boot without state it failed; an accepted --apply starts it (--no-block, with the lock released), so it serves the views and is no longer failed.
Diffstat (limited to 'nix/module.nix')
-rw-r--r--nix/module.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nix/module.nix b/nix/module.nix
index 62f4222..a273d45 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -142,6 +142,8 @@ let
settings = pkgs.writers.writeJSON "enstate-config.json" {
state-dir = cfg.stateDir;
run-dir = cfg.runDir;
+ # Started again by --apply if it failed (for want of the state, at boot).
+ unit = "enstate.service";
};
enstate = lib.getExe cfg.package;