summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces-systemd.nix
diff options
context:
space:
mode:
authorLuflosi <luflosi@luflosi.de>2022-01-21 18:45:31 +0100
committerLuflosi <luflosi@luflosi.de>2022-01-21 19:35:17 +0100
commit64560de406ec701e26f286163a8d775ed2d0f8b6 (patch)
treef02d8f2d880d35d8cd3b9386b1f6f752368b6b5a /nixos/modules/tasks/network-interfaces-systemd.nix
parente01fa67cdd9a976dc9b123e82f451f53b4dfe527 (diff)
downloadnixpkgs-64560de406ec701e26f286163a8d775ed2d0f8b6.tar
nixpkgs-64560de406ec701e26f286163a8d775ed2d0f8b6.tar.gz
nixpkgs-64560de406ec701e26f286163a8d775ed2d0f8b6.tar.bz2
nixpkgs-64560de406ec701e26f286163a8d775ed2d0f8b6.tar.lz
nixpkgs-64560de406ec701e26f286163a8d775ed2d0f8b6.tar.xz
nixpkgs-64560de406ec701e26f286163a8d775ed2d0f8b6.tar.zst
nixpkgs-64560de406ec701e26f286163a8d775ed2d0f8b6.zip
nixos/networkd: fix networking.networkd.static test
Commit ca58bd0a50f38de43b401df716806c0f83479a8e broke the test networking.networkd.static. This happened because the test sets `networking.defaultGateway`. This is implemented by adding the gateway to the list of `routes` using `mkDefault`. The `routes` are then overridden by an empty list in the newly added code. Replace `mkDefault` with `id` so the two lists are merged and everything (hopefully) works as expected.
See https://github.com/NixOS/nixpkgs/pull/144590 for a more context.
Diffstat (limited to 'nixos/modules/tasks/network-interfaces-systemd.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces-systemd.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces-systemd.nix b/nixos/modules/tasks/network-interfaces-systemd.nix
index 645ff161cdd..8a5e1b5af11 100644
--- a/nixos/modules/tasks/network-interfaces-systemd.nix
+++ b/nixos/modules/tasks/network-interfaces-systemd.nix
@@ -92,7 +92,7 @@ in
             };
           };
         });
-        networks."40-${i.name}" = mkMerge [ (genericNetwork mkDefault) {
+        networks."40-${i.name}" = mkMerge [ (genericNetwork id) {
           name = mkDefault i.name;
           DHCP = mkForce (dhcpStr
             (if i.useDHCP != null then i.useDHCP else false));