mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-10 19:26:52 +02:00
feat: use mainGateway for idols-ai, rename defaultGateway to proxyGateway
This commit is contained in:
@@ -11,11 +11,10 @@
|
||||
let
|
||||
hostName = "ruby"; # Define your hostname.
|
||||
|
||||
inherit (myvars.networking) defaultGateway defaultGateway6 nameservers;
|
||||
inherit (myvars.networking) proxyGateway proxyGateway6 nameservers;
|
||||
inherit (myvars.networking.hostsAddr.${hostName}) iface ipv4;
|
||||
ipv4WithMask = "${ipv4}/24";
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = mylib.scanPaths ./.;
|
||||
|
||||
# Enable binfmt emulation of aarch64-linux, this is required for cross compilation.
|
||||
@@ -35,7 +34,7 @@ in
|
||||
"exfat"
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
||||
|
||||
networking = {
|
||||
@@ -50,9 +49,9 @@ in
|
||||
systemd.network.enable = true;
|
||||
|
||||
systemd.network.networks."10-${iface}" = {
|
||||
matchConfig.Name = [ iface ];
|
||||
matchConfig.Name = [iface];
|
||||
networkConfig = {
|
||||
Address = [ ipv4WithMask ];
|
||||
Address = [ipv4WithMask];
|
||||
DNS = nameservers;
|
||||
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
||||
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
||||
@@ -61,11 +60,11 @@ in
|
||||
routes = [
|
||||
{
|
||||
Destination = "0.0.0.0/0";
|
||||
Gateway = defaultGateway;
|
||||
Gateway = proxyGateway;
|
||||
}
|
||||
{
|
||||
Destination = "::/0";
|
||||
Gateway = defaultGateway6;
|
||||
Gateway = proxyGateway6;
|
||||
GatewayOnLink = true; # it's a gateway on local link.
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user