fw + avahi
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user