From 11c6e8c9ef6684cdf1d3c0f5c0d20fa1d119779d Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Fri, 3 May 2024 18:32:06 +0100 Subject: [PATCH] nix/module.nix: Have systemd create state directory. Fixes: #5 --- nix/module.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/module.nix b/nix/module.nix index 773fed6..cb07128 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -29,7 +29,8 @@ in { + (lib.optionalString cfg.services.comin.debug "--debug ") + " run " + "--config ${cominConfigYaml}"; - Restart = "always"; + Restart = "always"; + StateDirectory = lib.mkIf (cominConfig.state_dir == "/var/lib/comin") "comin"; }; }; };