Skip to content

Instantly share code, notes, and snippets.

@ixxie

ixxie/deploy.nix Secret

Created August 25, 2018 22:38
Show Gist options
  • Save ixxie/6f7bd82705aba9799ef717907866c709 to your computer and use it in GitHub Desktop.
Save ixxie/6f7bd82705aba9799ef717907866c709 to your computer and use it in GitHub Desktop.
{
hetzner = { config, pkgs, ... }: {
config = {
deployment.targetHost = "host.example.com";
imports = [ ./hardware-configuration.nix ];
# 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