about summary refs log tree commit diff
path: root/nixos/modules/system/boot/networkd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r--nixos/modules/system/boot/networkd.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 21ee33a691a0..0221374ab835 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -2,6 +2,7 @@
 
 with lib;
 with import ./systemd-unit-options.nix { inherit config lib; };
+with import ./systemd-lib.nix { inherit config lib pkgs; };
 
 let
 
@@ -632,6 +633,9 @@ in
       // mapAttrs' (n: v: nameValuePair "${n}.netdev" (netdevToUnit n v)) cfg.netdevs
       // mapAttrs' (n: v: nameValuePair "${n}.network" (networkToUnit n v)) cfg.networks;
 
+    environment.etc."systemd/network".source =
+      generateUnits "network" cfg.units [] [];
+
     users.extraUsers.systemd-network.uid = config.ids.uids.systemd-network;
     users.extraGroups.systemd-network.gid = config.ids.gids.systemd-network;