mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/changedetection-io: fix creation of data dir
Create data directory using tmpfiles if it is not in the standard location. Do not run mkdir manually.
This commit is contained in:
parent
7eb83aaeb1
commit
7f78cd20fd
@ -129,9 +129,6 @@ in
|
||||
services.changedetection-io = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
preStart = ''
|
||||
mkdir -p ${cfg.datastorePath}
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
@ -153,7 +150,7 @@ in
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
tmpfiles.rules = mkIf defaultStateDir [
|
||||
tmpfiles.rules = mkIf (!defaultStateDir) [
|
||||
"d ${cfg.datastorePath} 0750 ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user