Router has connectivity

This commit is contained in:
Daniel Flanagan 2024-07-16 10:48:32 -05:00
parent 27b94ccb51
commit 5dfbcbebd3
3 changed files with 172 additions and 148 deletions

View file

@ -329,7 +329,7 @@
router = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
# outputs.diskoConfigurations.unencrypted
outputs.diskoConfigurations.unencrypted
common
./nixos/router.nix
];

View file

@ -753,6 +753,11 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}
'';
};
services.caddy.virtualHosts."git.beefcake" = {
extraConfig = ''
reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}
'';
};
}
{
services.vaultwarden = {

View file

@ -29,10 +29,6 @@
};
};
in {
networking.hostName = "router";
networking.domain = "h.lyte.dev";
networking.useDHCP = false;
boot.initrd.availableKernelModules = ["xhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
@ -178,7 +174,31 @@ in {
};
};
networking.extraHosts = ''
networking = {
nat.enable = true; # TODO: maybe replace some of the nftables stuff with this?
firewall.enable = false;
hostName = "router";
domain = "h.lyte.dev";
# useDHCP = true;
interfaces = {
enp2s0 = {
# should be wan0
useDHCP = true;
};
enp3s0 = {
# should be lan0
useDHCP = false;
};
wan0 = {
useDHCP = true;
};
lan0 = {
useDHCP = false;
};
};
extraHosts = ''
127.0.0.1 localhost
${ip} router.h.lyte.dev router
@ -187,9 +207,7 @@ in {
ff02::2 ip6-allrouters
'';
networking.nat.enable = true; # TODO: maybe replace some of the nftables stuff with this?
networking.firewall.enable = false;
networking.nftables = {
nftables = {
enable = true;
flushRuleset = true;
@ -285,7 +303,7 @@ in {
};
};
networking.dhcpcd = {
dhcpcd = {
enable = true;
extraConfig = ''
duid
@ -324,6 +342,9 @@ in {
static domain_name_servers=${ip}
'';
};
};
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
systemd.network = {
enable = true;
@ -352,9 +373,7 @@ in {
services.avahi = {
enable = true;
reflector = true;
allowInterfaces = [
lan_if
];
allowInterfaces = [lan_if];
};
system.stateVersion = "24.05";