mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 13:39:15 +03:00
nixos/network-interfaces-scripted: Fix network-setup triggering
This commit is contained in:
parent
59f512ef7d
commit
295a17f872
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue