summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-07-02 21:06:04 +0200
committermakefu <github@syntax-fehler.de>2017-07-02 21:10:29 +0200
commitc36d644059049dba69cf4e5a072f2c5b4c6f5856 (patch)
tree7c11a91799b693778d85cdc3c89d26b29a6bf400 /krebs
parent01a4ed89c72af0beefd2ba4bcd894017002720ff (diff)
urlwatch: set dataDir to home of urlwatch user
otherwise /var/empty will be used which then will clash with exim which tries to create Maildir in this folder explicitly setting the home directory in users also avoids the usage of execstartpre in favor of createHome
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/urlwatch.nix13
1 files changed, 2 insertions, 11 deletions
diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix
index c06e5ddb1..380e30ae3 100644
--- a/krebs/3modules/urlwatch.nix
+++ b/krebs/3modules/urlwatch.nix
@@ -142,17 +142,6 @@ let
PrivateTmp = "true";
SyslogIdentifier = "urlwatch";
Type = "oneshot";
- ExecStartPre =
- pkgs.writeDash "urlwatch-prestart" ''
- set -euf
-
- dataDir=$HOME
-
- if ! test -e "$dataDir"; then
- mkdir -m 0700 -p "$dataDir"
- chown ${user.name}: "$dataDir"
- fi
- '';
ExecStart = pkgs.writeDash "urlwatch" ''
set -euf
@@ -185,6 +174,8 @@ let
};
users.extraUsers = singleton {
inherit (user) name uid;
+ home = cfg.dataDir;
+ createHome = true;
};
};