diff options
author | makefu <github@syntax-fehler.de> | 2019-01-28 08:32:05 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2019-01-28 08:32:05 +0100 |
commit | 7bc36518d1afc1050994e0806477fed2c8fa45da (patch) | |
tree | f801d55e368f7ce7c10a97482808eeab9491f45f /krebs/3modules/reaktor2.nix | |
parent | 0c25e9790578821a1038831ea852c6bfbc83ff97 (diff) | |
parent | 56a0b3f0020b4465d1f1d573e5d427d8c702fd86 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules/reaktor2.nix')
-rw-r--r-- | krebs/3modules/reaktor2.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix index b667bcc92..e3e6ddf4f 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.username}"; readOnly = true; type = types.absolute-pathname; }; @@ -33,6 +33,14 @@ with import <stockholm/lib>; default = "reaktor2${optionalString (name != "default") "-${name}"}"; type = types.filename; }; + username = mkOption { + default = self.config.systemd-service-name; + type = types.username; + }; + useTLS = mkOption { + default = self.config.port == "6697"; + type = types.bool; + }; }; })); }; @@ -43,10 +51,10 @@ with import <stockholm/lib>; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - User = cfg.systemd-service-name; + User = cfg.username; Group = "reaktor2"; DynamicUser = true; - StateDirectory = cfg.systemd-service-name; + StateDirectory = cfg.username; ExecStart = let configFile = pkgs.writeJSON configFileName configValue; configFileName = "${cfg.systemd-service-name}.config.json"; |