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
This commit is contained in:
makefu 2017-07-02 21:06:04 +02:00
parent 01a4ed89c7
commit c36d644059
No known key found for this signature in database
GPG key ID: 36F7711F3FC0F225

View file

@ -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;
};
};