set up ipv6
This commit is contained in:
parent
bc0fb79718
commit
00debaaa80
3 changed files with 25 additions and 2 deletions
19
clients/quadraticserver/network.nix
Normal file
19
clients/quadraticserver/network.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
networking.useDHCP = false;
|
||||||
|
systemd.network.enable = true;
|
||||||
|
systemd.network.networks."30-wan" = {
|
||||||
|
matchConfig.Name = "enp1s0";
|
||||||
|
networkConfig.DHCP = "no";
|
||||||
|
address = [
|
||||||
|
"91.99.155.129/32"
|
||||||
|
"2a01:4f8:c012:d202::1/64"
|
||||||
|
];
|
||||||
|
routes = [
|
||||||
|
{
|
||||||
|
Gateway = "172.31.1.1";
|
||||||
|
GatewayOnLink = true;
|
||||||
|
}
|
||||||
|
{ Gateway = "fe80::1"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
services.dnsproxy = {
|
services.dnsproxy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -9,5 +10,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."resolv.conf".text = "nameserver 127.0.0.1";
|
environment.etc."resolv.conf".text = lib.mkForce "nameserver 127.0.0.1";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
systemd.services.caddy.serviceConfig.Restart = lib.mkForce "always";
|
systemd.services.caddy.serviceConfig.Restart = lib.mkForce "always";
|
||||||
networking.firewall.allowedTCPPorts = [ 443 ];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = "henry@henryhiles.com";
|
email = "henry@henryhiles.com";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue