summary refs log tree commit diff
path: root/nixos/modules/system/boot/initrd-network.nix
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2018-06-11 10:35:02 +0000
committerGitHub <noreply@github.com>2018-06-11 10:35:02 +0000
commit4c3352896edb398ab29ce583a270ef3a8f2b905e (patch)
tree924d4afbb91a3c036f82ed59de8f79af10ef683c /nixos/modules/system/boot/initrd-network.nix
parented657a98c76a427d9c6a485ecb912386f6157a5d (diff)
downloadnixlib-4c3352896edb398ab29ce583a270ef3a8f2b905e.tar
nixlib-4c3352896edb398ab29ce583a270ef3a8f2b905e.tar.gz
nixlib-4c3352896edb398ab29ce583a270ef3a8f2b905e.tar.bz2
nixlib-4c3352896edb398ab29ce583a270ef3a8f2b905e.tar.lz
nixlib-4c3352896edb398ab29ce583a270ef3a8f2b905e.tar.xz
nixlib-4c3352896edb398ab29ce583a270ef3a8f2b905e.tar.zst
nixlib-4c3352896edb398ab29ce583a270ef3a8f2b905e.zip
nixos/initrd-network: support hetzner
Diffstat (limited to 'nixos/modules/system/boot/initrd-network.nix')
-rw-r--r--nixos/modules/system/boot/initrd-network.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/initrd-network.nix b/nixos/modules/system/boot/initrd-network.nix
index 33862b0965cc..384ae909b701 100644
--- a/nixos/modules/system/boot/initrd-network.nix
+++ b/nixos/modules/system/boot/initrd-network.nix
@@ -12,6 +12,7 @@ let
       if [ "$1" = bound ]; then
         ip address add "$ip/$mask" dev "$interface"
         if [ -n "$router" ]; then
+          ip route add "$router" dev "$interface" # just in case if "$router" is not within "$ip/$mask" (e.g. Hetzner Cloud)
           ip route add default via "$router" dev "$interface"
         fi
         if [ -n "$dns" ]; then