nixfiles/hosts/scotty-router/configuration.nix

64 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2021-03-13 15:32:44 +01:00
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
../../common/common.nix
./nat.nix
./dnsmasq.nix
./wireguard.nix
../../common/netdata.nix
../../common/kvm.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "router";
networking.useDHCP = false;
networking.interfaces.ens18.useDHCP = true;
networking.interfaces.ens18.ipv6.addresses = [{
address = "2001:638:904:ffcb::5";
prefixLength = 64;
}];
networking.interfaces.ens19.ipv4.addresses = [ {
address = "10.23.42.1";
prefixLength = 24;
}];
networking.interfaces.ens19.ipv6.addresses = [{
address = "2a01:4f8:c010:61dc:200::1";
prefixLength = 72;
}];
networking.defaultGateway6 = {
address = "fe80::d067:2680:4649:fba6";
interface = "ens18";
};
services.radvd = {
enable = true;
config = ''
interface ens19
{
AdvSendAdvert on;
AdvDefaultLifetime 1800;
prefix 2a01:4f8:c010:61dc:200::/72 {};
AdvSourceLLAddress on;
route ::/0 {};
};
'';
};
/*services.ndppd = {
enable = true;
proxies."pub0" = {
interface = "pub0";
rules."2a03:4000:45:5f3:200::/72" = {
method = "iface";
interface = "ens19";
};
};
};*/
}