diff options
author | lassulus <lassulus@lassul.us> | 2017-07-29 00:38:22 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-07-29 00:38:22 +0200 |
commit | 5ff77c7c64fe8eb94004a77718e70cfa14a3c9c4 (patch) | |
tree | b9ceba038f1e54fe68dd3ff94b551535554cd0fa /krebs/3modules | |
parent | c575f32d56b53ecbc1bcf28342f4eff683b7818c (diff) | |
parent | 17497235e84985f9b2ec4acda47f15a9fe68453e (diff) |
Merge remote-tracking branch 'gum/master' into HEAD
Diffstat (limited to 'krebs/3modules')
-rw-r--r-- | krebs/3modules/Reaktor.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index a70f1ef5d..99a7a55ef 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -4,8 +4,7 @@ with import <stockholm/lib>; let cfg = config.krebs.Reaktor; - - workdir = "/var/lib/Reaktor"; + homedir = "/var/lib/Reaktor"; out = { options.krebs.Reaktor = api; @@ -38,6 +37,14 @@ let default = [pkgs.ReaktorPlugins.nixos-version]; }; + workdir = mkOption { + default = "/var/lib/Reaktor"; + type = types.path; + description = '' + path to be used as workdir (home dir is still /var/lib/Reaktor) + ''; + }; + extraConfig = mkOption { default = ""; type = types.string; @@ -84,7 +91,7 @@ let name = "Reaktor"; uid = genid name; description = "Reaktor user"; - home = workdir; + home = homedir; createHome = true; }; @@ -118,7 +125,7 @@ let REAKTOR_NICKNAME = botcfg.nickname; REAKTOR_DEBUG = (if botcfg.debug then "True" else "False"); REAKTOR_CHANNELS = lib.concatStringsSep "," botcfg.channels; - state_dir = workdir; + state_dir = botcfg.workdir; } // botcfg.extraEnviron; serviceConfig= { @@ -129,6 +136,7 @@ let else ''(${pkgs.Reaktor}/bin/reaktor get-config;cat "${ReaktorConfig}" ) > /tmp/reaktor-${name}-config.py'' } + mkdir -p ${botcfg.workdir} ''; ExecStart = "${pkgs.Reaktor}/bin/reaktor run /tmp/reaktor-${name}-config.py"; PrivateTmp = "true"; |