alpha: static ipv4 configuration
This commit is contained in:
parent
830dd4c72a
commit
67dfb365b8
|
@ -39,8 +39,5 @@
|
|||
}
|
||||
];
|
||||
|
||||
# Enables DHCP on all ethernet and wireless LAN interfaces.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
||||
|
|
|
@ -5,13 +5,21 @@
|
|||
}: {
|
||||
systemd.network = {
|
||||
# Main interface
|
||||
# https://nixos.wiki/wiki/Install_NixOS_on_Hetzner_Cloud
|
||||
networks."10-lan" = {
|
||||
name = "enp1s0";
|
||||
networkConfig.DHCP = "ipv4";
|
||||
address = [
|
||||
"116.203.179.206/32"
|
||||
"2a01:4f8:c2c:71c0::/64"
|
||||
];
|
||||
routes = [
|
||||
{routeConfig = {Destination = "172.31.1.1";};}
|
||||
{
|
||||
routeConfig = {
|
||||
Gateway = "172.31.1.1";
|
||||
GatewayOnLink = true;
|
||||
};
|
||||
}
|
||||
{routeConfig = {Gateway = "fe80::1";};}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue