mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
duplicati: PermissionsStartOnly is deprecated
This commit is contained in:
parent
c06b8b5988
commit
f572d4eb91
@ -47,15 +47,11 @@ in
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
PermissionsStartOnly = true;
|
|
||||||
Group = "duplicati";
|
Group = "duplicati";
|
||||||
|
StateDirectory = "/var/lib/duplicati";
|
||||||
ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=/var/lib/duplicati";
|
ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=/var/lib/duplicati";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
preStart = ''
|
|
||||||
mkdir -p /var/lib/duplicati
|
|
||||||
chown -R ${cfg.user}:duplicati /var/lib/duplicati
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.duplicati = lib.optionalAttrs (cfg.user == "duplicati") {
|
users.users.duplicati = lib.optionalAttrs (cfg.user == "duplicati") {
|
||||||
|
Loading…
Reference in New Issue
Block a user