diff options
author | lassulus <lassulus@lassul.us> | 2019-01-27 13:41:51 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2019-01-27 13:42:05 +0100 |
commit | 6271cfaed465ca826534494951b450713773c1a4 (patch) | |
tree | b471b0e0fc425bcdec565c4d93fe29c02f599a55 /krebs | |
parent | aa070d5db7e9fac66addcbf2005f4c404c84c019 (diff) |
reaktor2: add user option
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/reaktor2.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix index b667bcc92..d31447c93 100644 --- a/krebs/3modules/reaktor2.nix +++ b/krebs/3modules/reaktor2.nix @@ -25,7 +25,7 @@ with import <stockholm/lib>; type = types.listOf types.attrs; }; stateDir = mkOption { - default = "/var/lib/${self.config.systemd-service-name}"; + default = "/var/lib/${self.config.user}"; readOnly = true; type = types.absolute-pathname; }; @@ -33,6 +33,10 @@ with import <stockholm/lib>; default = "reaktor2${optionalString (name != "default") "-${name}"}"; type = types.filename; }; + user = mkOption { + default = self.config.systemd-service-name; + type = types.str; + }; }; })); }; @@ -43,10 +47,10 @@ with import <stockholm/lib>; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - User = cfg.systemd-service-name; + User = cfg.user; Group = "reaktor2"; DynamicUser = true; - StateDirectory = cfg.systemd-service-name; + StateDirectory = cfg.user; ExecStart = let configFile = pkgs.writeJSON configFileName configValue; configFileName = "${cfg.systemd-service-name}.config.json"; |