Skip to content

Instantly share code, notes, and snippets.

@dhess
Created August 9, 2018 22:27
Show Gist options
  • Save dhess/b23d198f7b4842af3b5a031cfb5fdd39 to your computer and use it in GitHub Desktop.
Save dhess/b23d198f7b4842af3b5a031cfb5fdd39 to your computer and use it in GitHub Desktop.
{
hetzner = { config, pkgs, ... }: {
config = {
deployment.targetHost = "host.example.com";
# Hetzner network config is static.
boot.kernelParams = [ "net.ifnames=0" ]; # Don't rename interfaces
networking = {
defaultGateway = "192.168.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
nameservers = [ "8.8.8.8" "8.8.4.4" ];
interfaces.eth0 = {
ipv4.addresses = [
{
address = "192.168.1.2";
prefixLength = 27;
}
];
ipv6.addresses = [
{
address = "2001:db8::3";
prefixLength = 64;
}
];
};
};
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment