From 295a17f87249ffc042964aa40b217cf045f9830a Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sat, 22 Nov 2014 22:22:09 -0800 Subject: [PATCH] nixos/network-interfaces-scripted: Fix network-setup triggering --- nixos/modules/tasks/network-interfaces-scripted.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index a39f1a09a344..64291a62421d 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -123,6 +123,7 @@ in # Only do an add if it's necessary. This is # useful when the Nix store is accessed via this # interface (e.g. in a QEMU VM test). + restart_network_interfaces=false '' + flip concatMapStrings (ips) (ip: let @@ -142,7 +143,7 @@ in '') + optionalString (ips != [ ]) '' - if [ restart_network_setup = true ]; then + if [ "$restart_network_setup" = "true" ]; then # Ensure that the default gateway remains set. # (Flushing this interface may have removed it.) ${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service