diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2019-09-14 19:51:29 +0200 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2020-01-06 10:39:18 -0500 |
commit | 1d61efb7f177f7b70c467ab4940fde0a3481d4dc (patch) | |
tree | 860cce85acd87bc07aa2d11f4feac5d0df48a5c0 /nixos/modules/system | |
parent | 6bd13ccd8e7fd1f241eb655f7112df1ed2889a3a (diff) |
treewide: use attrs instead of list for types.loaOf options
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 5 | ||||
-rw-r--r-- | nixos/modules/system/boot/networkd.nix | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 8a309f3bc5fe1..6edb9082e75a2 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -256,9 +256,8 @@ in # Create /etc/modules-load.d/nixos.conf, which is read by # systemd-modules-load.service to load required kernel modules. - environment.etc = singleton - { target = "modules-load.d/nixos.conf"; - source = kernelModulesConf; + environment.etc = + { "modules-load.d/nixos.conf".source = kernelModulesConf; }; systemd.services.systemd-modules-load = diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 58d914d08106a..3e289a63139f7 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -872,10 +872,10 @@ let ''; }; - unitFiles = map (name: { - target = "systemd/network/${name}"; - source = "${cfg.units.${name}.unit}/${name}"; - }) (attrNames cfg.units); + unitFiles = listToAttrs (map (name: { + name = "systemd/network/${name}"; + value.source = "${cfg.units.${name}.unit}/${name}"; + }) (attrNames cfg.units)); in { @@ -938,7 +938,7 @@ in systemd.services.systemd-networkd = { wantedBy = [ "multi-user.target" ]; - restartTriggers = map (f: f.source) (unitFiles); + restartTriggers = attrNames unitFiles; # prevent race condition with interface renaming (#39069) requires = [ "systemd-udev-settle.service" ]; after = [ "systemd-udev-settle.service" ]; |