mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-12-22 08:08:29 +03:00
fix: generate network config for Hetzner Cloud (#133)
This commit is contained in:
parent
50dfa0845c
commit
5e110b972f
2 changed files with 6 additions and 3 deletions
|
@ -144,7 +144,7 @@ When creating a server provide the following script as "User data":
|
||||||
```
|
```
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-22.05 bash 2>&1 | tee /tmp/infect.log
|
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-22.05 bash 2>&1 | tee /tmp/infect.log
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Tested on
|
#### Tested on
|
||||||
|
|
|
@ -140,7 +140,10 @@ EOF
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [ ${nameservers[@]} ];
|
nameservers = [ ${nameservers[@]} ];
|
||||||
defaultGateway = "${gateway}";
|
defaultGateway = "${gateway}";
|
||||||
defaultGateway6 = "${gateway6}";
|
defaultGateway6 = {
|
||||||
|
address = "${gateway6}";
|
||||||
|
interface = "${eth0_name}";
|
||||||
|
};
|
||||||
dhcpcd.enable = false;
|
dhcpcd.enable = false;
|
||||||
$predictable_inames
|
$predictable_inames
|
||||||
interfaces = {
|
interfaces = {
|
||||||
|
@ -362,7 +365,7 @@ infect() {
|
||||||
|
|
||||||
[ "$PROVIDER" = "digitalocean" ] && doNetConf=y # digitalocean requires detailed network config to be generated
|
[ "$PROVIDER" = "digitalocean" ] && doNetConf=y # digitalocean requires detailed network config to be generated
|
||||||
[ "$PROVIDER" = "lightsail" ] && newrootfslabel="nixos"
|
[ "$PROVIDER" = "lightsail" ] && newrootfslabel="nixos"
|
||||||
if [[ "$PROVIDER" = "digitalocean" ]] || [[ "$PROVIDER" = "servarica" ]]; then
|
if [[ "$PROVIDER" = "digitalocean" ]] || [[ "$PROVIDER" = "servarica" ]] || [[ "$PROVIDER" = "hetznercloud" ]]; then
|
||||||
doNetConf=y # some providers require detailed network config to be generated
|
doNetConf=y # some providers require detailed network config to be generated
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue