summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorArian van Putten <arian.vanputten@gmail.com>2020-04-22 23:32:12 +0200
committerArian van Putten <arian.vanputten@gmail.com>2020-04-23 09:58:18 +0200
commitf332109ebf67951b412457fee023222c4ed5f561 (patch)
tree8185b82c5fe660b6e37684b8037b127ab98d7cf5 /nixos/modules
parent14395cc68741ae6de4256360204fd192e4038da3 (diff)
downloadnixpkgs-f332109ebf67951b412457fee023222c4ed5f561.tar
nixpkgs-f332109ebf67951b412457fee023222c4ed5f561.tar.gz
nixpkgs-f332109ebf67951b412457fee023222c4ed5f561.tar.bz2
nixpkgs-f332109ebf67951b412457fee023222c4ed5f561.tar.lz
nixpkgs-f332109ebf67951b412457fee023222c4ed5f561.tar.xz
nixpkgs-f332109ebf67951b412457fee023222c4ed5f561.tar.zst
nixpkgs-f332109ebf67951b412457fee023222c4ed5f561.zip
nixos/datadog-agent: Fix restartTriggers
Fixes #85800

1d61efb7f177f7b70c467ab4940fde0a3481d4dc accidentially changed the
restartTriggers of `datadog-agent.service` to point to the attribute
name (in this case, a location relative to `/etc`), instead of the
location of the config files in the nix store.

This caused datadog to not get restarted on activation of new
config, if the file name hasn't changed.

Fix this, by pointing this back to the location in the nix store.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/monitoring/datadog-agent.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/datadog-agent.nix b/nixos/modules/services/monitoring/datadog-agent.nix
index 2c5fe47242e..f1cb890794e 100644
--- a/nixos/modules/services/monitoring/datadog-agent.nix
+++ b/nixos/modules/services/monitoring/datadog-agent.nix
@@ -225,7 +225,7 @@ in {
           Restart = "always";
           RestartSec = 2;
         };
-        restartTriggers = [ datadogPkg ] ++ attrNames etcfiles;
+        restartTriggers = [ datadogPkg ] ++  map (x: x.source) (attrValues etcfiles);
       } attrs;
     in {
       datadog-agent = makeService {