mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
nixos/etcd: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
062efe018d
commit
6ac630bad3
1 changed files with 4 additions and 6 deletions
|
@ -142,6 +142,10 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.dataDir}' 0700 etcd - - -"
|
||||
];
|
||||
|
||||
systemd.services.etcd = {
|
||||
description = "etcd key-value store";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
@ -176,14 +180,8 @@ in {
|
|||
Type = "notify";
|
||||
ExecStart = "${pkgs.etcd.bin}/bin/etcd";
|
||||
User = "etcd";
|
||||
PermissionsStartOnly = true;
|
||||
LimitNOFILE = 40000;
|
||||
};
|
||||
|
||||
preStart = ''
|
||||
mkdir -m 0700 -p ${cfg.dataDir}
|
||||
if [ "$(id -u)" = 0 ]; then chown etcd ${cfg.dataDir}; fi
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.etcdctl ];
|
||||
|
|
Loading…
Reference in a new issue