summary refs log tree commit diff
path: root/nixos/modules/system/boot/networkd.nix
diff options
context:
space:
mode:
authorAndrew Marshall <andrew@johnandrewmarshall.com>2023-09-10 00:54:42 -0400
committerAndrew Marshall <andrew@johnandrewmarshall.com>2023-09-10 00:54:42 -0400
commit3f9cc712281a3b194cdb037e1778ebc54280d07b (patch)
tree98d6a469f218252b23692efafa5f919473520b0f /nixos/modules/system/boot/networkd.nix
parent803bcc1b0dd863da70eae4029daf2d38799abd07 (diff)
downloadnixpkgs-3f9cc712281a3b194cdb037e1778ebc54280d07b.tar
nixpkgs-3f9cc712281a3b194cdb037e1778ebc54280d07b.tar.gz
nixpkgs-3f9cc712281a3b194cdb037e1778ebc54280d07b.tar.bz2
nixpkgs-3f9cc712281a3b194cdb037e1778ebc54280d07b.tar.lz
nixpkgs-3f9cc712281a3b194cdb037e1778ebc54280d07b.tar.xz
nixpkgs-3f9cc712281a3b194cdb037e1778ebc54280d07b.tar.zst
nixpkgs-3f9cc712281a3b194cdb037e1778ebc54280d07b.zip
nixos/networkd: Fix incorrectly treating attrset as list
This reverses a [change made during PR review][1] that I did not sufficiently
test, causing [this error][2].

[1]: https://github.com/NixOS/nixpkgs/pull/249643#discussion_r1309151135
[2]: https://github.com/NixOS/nixpkgs/pull/249643#issuecomment-1712707336
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-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 756632a45f9..87afc502325 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" ];