summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/reaktor2.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-27 20:06:06 +0100
committertv <tv@krebsco.de>2019-01-27 20:06:06 +0100
commit52ef20148e44f2b2017a0edc30899860799ad652 (patch)
treec4b9debbb9d304a6c8f2a238270e33ffac563328 /krebs/3modules/reaktor2.nix
parentfa1e5d5b7fa2424e636d5807141c3043770affaf (diff)
reaktor2 service: user -> username + proper type
Diffstat (limited to 'krebs/3modules/reaktor2.nix')
-rw-r--r--krebs/3modules/reaktor2.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix
index 3f263d010..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.user}";
+ default = "/var/lib/${self.config.username}";
readOnly = true;
type = types.absolute-pathname;
};
@@ -33,9 +33,9 @@ with import <stockholm/lib>;
default = "reaktor2${optionalString (name != "default") "-${name}"}";
type = types.filename;
};
- user = mkOption {
+ username = mkOption {
default = self.config.systemd-service-name;
- type = types.str;
+ type = types.username;
};
useTLS = mkOption {
default = self.config.port == "6697";
@@ -51,10 +51,10 @@ with import <stockholm/lib>;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
- User = cfg.user;
+ User = cfg.username;
Group = "reaktor2";
DynamicUser = true;
- StateDirectory = cfg.user;
+ StateDirectory = cfg.username;
ExecStart = let
configFile = pkgs.writeJSON configFileName configValue;
configFileName = "${cfg.systemd-service-name}.config.json";