Merge pull request #254333 from amarshall/fix-networkd-reload

nixos/networkd: Fix incorrectly treating attrset as list
This commit is contained in:
K900 2023-09-10 12:48:16 +03:00 committed by GitHub
commit bf58d13eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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" ];