duplicati: PermissionsStartOnly is deprecated

This commit is contained in:
Domen Kožar 2019-06-26 15:51:40 +02:00
parent c06b8b5988
commit f572d4eb91
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246

View file

@ -47,15 +47,11 @@ in
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = cfg.user;
PermissionsStartOnly = true;
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";
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") {