about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-09-10 12:48:16 +0300
committerGitHub <noreply@github.com>2023-09-10 12:48:16 +0300
commitbf58d13ecac66f34224b9faf49401e3840e3c2ae (patch)
treedaa751181321c0d2764bdc14c35d4bb5c74eb9e0 /nixos
parent734391f14bfe5b103dffee54ad117156662cd84e (diff)
parent3f9cc712281a3b194cdb037e1778ebc54280d07b (diff)
Merge pull request #254333 from amarshall/fix-networkd-reload
nixos/networkd: Fix incorrectly treating attrset as list
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/networkd.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 756632a45f90a..87afc5023253f 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -2814,9 +2814,8 @@ let
 
       systemd.services.systemd-networkd = let
         isReloadableUnitFileName = unitFileName: strings.hasSuffix ".network" unitFileName;
-        partitionedUnitFiles = lib.partition isReloadableUnitFileName unitFiles;
-        reloadableUnitFiles = partitionedUnitFiles.right;
-        nonReloadableUnitFiles = partitionedUnitFiles.wrong;
+        reloadableUnitFiles = attrsets.filterAttrs (k: v: isReloadableUnitFileName k) unitFiles;
+        nonReloadableUnitFiles = attrsets.filterAttrs (k: v: !isReloadableUnitFileName k) unitFiles;
         unitFileSources = unitFiles: map (x: x.source) (attrValues unitFiles);
       in {
         wantedBy = [ "multi-user.target" ];