From 14395cc68741ae6de4256360204fd192e4038da3 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Wed, 22 Apr 2020 23:31:43 +0200 Subject: [PATCH 1/2] nixos/networkd: Fix restartTriggers 1d61efb7f177f7b70c467ab4940fde0a3481d4dc accidentially changed the restartTriggers of systemd-networkd.service` to point to the attribute name (in this case, a location relative to `/etc`), instead of the location of the network-related unit files in the nix store. This caused systemd-networkd to not get restarted on activation of new networking config, if the file name hasn't changed. Fix this, by pointing this back to the location in the nix store. --- nixos/modules/system/boot/networkd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 3078f84f6e92..a7580fb19978 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -1073,7 +1073,7 @@ in systemd.services.systemd-networkd = { wantedBy = [ "multi-user.target" ]; - restartTriggers = attrNames unitFiles; + restartTriggers = map (x: x.source) (attrValues unitFiles); # prevent race condition with interface renaming (#39069) requires = [ "systemd-udev-settle.service" ]; after = [ "systemd-udev-settle.service" ]; From f332109ebf67951b412457fee023222c4ed5f561 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Wed, 22 Apr 2020 23:32:12 +0200 Subject: [PATCH 2/2] 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. --- nixos/modules/services/monitoring/datadog-agent.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/datadog-agent.nix b/nixos/modules/services/monitoring/datadog-agent.nix index 2c5fe47242e7..f1cb890794e1 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 {