mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
networking: Unify underlay config across hosts
This commit is contained in:
parent
1d1709e1ba
commit
27b5c57023
19 changed files with 240 additions and 258 deletions
|
|
@ -20,14 +20,17 @@
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
networking = {
|
||||
overlay.address = "10.254.250.2";
|
||||
overlay = {
|
||||
address = "10.254.250.2";
|
||||
isLighthouse = true;
|
||||
role = "server";
|
||||
};
|
||||
underlay = {
|
||||
interface = "enp1s0";
|
||||
address = "49.13.231.235";
|
||||
cidr = "49.13.231.235/32";
|
||||
isPublic = true;
|
||||
gateway = "172.31.1.1";
|
||||
};
|
||||
isLighthouse = true;
|
||||
isServer = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ modulesPath, lib, ... }:
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ "${modulesPath}/profiles/qemu-guest.nix" ];
|
||||
|
||||
|
|
@ -14,22 +14,4 @@
|
|||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
networking.useDHCP = false;
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."10-enp1s0" = {
|
||||
matchConfig.Name = "enp1s0";
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
address = [ "49.13.231.235/32" ];
|
||||
routes = lib.singleton {
|
||||
Gateway = "172.31.1.1";
|
||||
GatewayOnLink = true;
|
||||
};
|
||||
dns = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue