diff options
author | Aaron Andersen <aaron@fosslib.net> | 2019-02-23 17:45:28 -0500 |
---|---|---|
committer | Aaron Andersen <aaron@fosslib.net> | 2019-05-25 13:48:41 -0400 |
commit | 191e4b075547c46449eaefd23b600d42e76d26e8 (patch) | |
tree | 757a933bb8bbefbef05c67ec0b36c9bcbde4b78e | |
parent | 73342be85bc28e8ab0e420554a3a5f0b83d164e5 (diff) | |
download | nixpkgs-191e4b075547c46449eaefd23b600d42e76d26e8.tar nixpkgs-191e4b075547c46449eaefd23b600d42e76d26e8.tar.gz nixpkgs-191e4b075547c46449eaefd23b600d42e76d26e8.tar.bz2 nixpkgs-191e4b075547c46449eaefd23b600d42e76d26e8.tar.lz nixpkgs-191e4b075547c46449eaefd23b600d42e76d26e8.tar.xz nixpkgs-191e4b075547c46449eaefd23b600d42e76d26e8.tar.zst nixpkgs-191e4b075547c46449eaefd23b600d42e76d26e8.zip |
nixos/heartbeat: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
-rw-r--r-- | nixos/modules/services/logging/heartbeat.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/logging/heartbeat.nix b/nixos/modules/services/logging/heartbeat.nix index b595ac07bf5..56fb4deabda 100644 --- a/nixos/modules/services/logging/heartbeat.nix +++ b/nixos/modules/services/logging/heartbeat.nix @@ -54,16 +54,18 @@ in config = mkIf cfg.enable { + systemd.tmpfiles.rules = [ + "d '${cfg.stateDir}' - nobody nogroup - -" + ]; + systemd.services.heartbeat = with pkgs; { description = "heartbeat log shipper"; wantedBy = [ "multi-user.target" ]; preStart = '' mkdir -p "${cfg.stateDir}"/{data,logs} - chown nobody:nogroup "${cfg.stateDir}"/{data,logs} ''; serviceConfig = { User = "nobody"; - PermissionsStartOnly = true; AmbientCapabilities = "cap_net_raw"; ExecStart = "${pkgs.heartbeat}/bin/heartbeat -c \"${heartbeatYml}\" -path.data \"${cfg.stateDir}/data\" -path.logs \"${cfg.stateDir}/logs\""; }; |