This commit is contained in:
2025-03-31 18:24:49 -04:00
parent 6cfbc68c8b
commit dccbb234f2
70 changed files with 1276 additions and 206 deletions

View File

@@ -0,0 +1,33 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkForce;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.system.networking;
in
{
options.${namespace}.system.networking = {
enable = lib.mkEnableOption "networking support";
enableIWD = mkBoolOpt false "enable iwd";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
mtr
tcpdump
traceroute
];
reichard.user.extraGroups = [ "network" ];
networking = {
firewall.enable = true;
usePredictableInterfaceNames = mkForce true;
} // (lib.optionalAttrs cfg.enableIWD) {
wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
};
};
}

View File

@@ -0,0 +1,26 @@
{ config, lib, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.system.networking;
in
{
config = mkIf cfg.enable {
reichard.user.extraGroups = [ "networkmanager" ];
networking.networkmanager = {
enable = true;
connectionConfig = {
"connection.mdns" = "2";
};
# unmanaged = [
# "interface-name:br-*"
# "interface-name:rndis*"
# ]
# ++ lib.optionals config.${namespace}.virtualisation.podman.enable [ "interface-name:docker*" ]
# ++ lib.optionals config.${namespace}.virtualisation.kvm.enable [ "interface-name:virbr*" ];
};
};
}