fw + avahi

This commit is contained in:
2025-04-06 12:52:25 -04:00
parent cddaa01e99
commit 7705f24e0f
9 changed files with 83 additions and 58 deletions

View File

@@ -1,14 +1,16 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkForce;
inherit (lib.${namespace}) mkBoolOpt;
inherit (lib) mkIf mkDefault mkEnableOption;
inherit (lib.${namespace}) mkBoolOpt enabled;
cfg = config.${namespace}.system.networking;
in
{
options.${namespace}.system.networking = {
enable = lib.mkEnableOption "networking support";
enableIWD = mkBoolOpt false "enable iwd";
enable = mkEnableOption "Enable Networking";
enableIWD = mkEnableOption "Enable IWD";
useDHCP = mkBoolOpt true "Use DHCP";
useNetworkd = mkBoolOpt false "Use networkd";
};
config = mkIf cfg.enable {
@@ -21,8 +23,9 @@ in
reichard.user.extraGroups = [ "network" ];
networking = {
firewall.enable = true;
usePredictableInterfaceNames = mkForce true;
firewall = enabled;
useDHCP = mkDefault cfg.useDHCP;
useNetworkd = cfg.useNetworkd;
} // (lib.optionalAttrs cfg.enableIWD) {
wireless.iwd = {
enable = true;