WIP: router: add configuration for test router

This commit is contained in:
2025-06-06 15:08:24 -07:00
parent d1d791f9fb
commit 0925b5de04
5 changed files with 44 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }:
let
cfg = config.router;
vars = import ./vars.nix config;
links = vars.links;
ifs = vars.ifs;
@@ -57,7 +58,7 @@ in
# https://github.com/systemd/systemd/issues/22571
# https://github.com/systemd/systemd/issues/22571#issuecomment-2094905496
# https://gist.github.com/csamsel/0f8cca3b2e64d7e4cc47819ec5ba9396
networking.dhcpcd.enable = true;
networking.dhcpcd.enable = cfg.enableDhcpClient;
networking.dhcpcd.allowInterfaces = [ ifs.wan.name ];
networking.dhcpcd.extraConfig = ''
debug

View File

@@ -8,7 +8,13 @@ with lib;
enableDesktop = mkOption {
type = types.bool;
default = false;
description = "Enable desktop environment";
description = "Enable desktop environment for debugging";
};
enableDhcpClient = mkOption {
type = types.bool;
default = false;
description = "Enable DHCP client (should only be set on the main router)";
};
wanMAC = mkOption {