ZDOH7B6FV7KM7QJEMOW2LIEXL3H45HL3C6LKDHTG4TEDWQUVYDJQC { config, lib, ... }: letinherit (lib) enabled mkIf types;in {# Named "network" to avoid conflicts with the "networking" options.# Not sure if it would even be a problem but oh well.options.network = {enable = lib.mkEnableOption "network";
{config.flake.modules.nixos.network ={ config, lib, ... }:letinherit (lib)mkIftypesmkOptionmkDefault;in{# Named "network" to avoid conflicts with the "networking" options.# Not sure if it would even be a problem but oh well.options.network = {
interfaces = lib.mkOption {type = with types; listOf str;example = [ "ts0" ];default = [ "ts0" ];description = "Network interfaces";};
interfaces = mkOption {type = with types; listOf str;example = [ "ts0" ];default = [ "ts0" ];description = "Network interfaces";};
domain = lib.mkOption {type = with types; nullOr str;default = null;example = "example.com";description = "Network domain (optional)";};
domain = mkOption {type = with types; nullOr str;default = null;example = "example.com";description = "Network domain (optional)";};
tcpPorts = lib.mkOption {type = with types; listOf (either int str);default = [ 22 ];example = [ 22 80 443 ];description = "TCP ports to allow through the firewall";};};
tcpPorts = mkOption {type = with types; listOf (either int str);default = [ 22 ];example = [2280443];description = "TCP ports to allow through the firewall";};};
config = {networking.hostName = config.network.hostName;
config = {networking.networkmanager = {enable = true;wifi.powersave = false;};programs.nm-applet.enable = true;users.users.jam.extraGroups = [ "networkmanager" ];networking.hostName = config.network.hostName;
networking.firewall = enabled {trustedInterfaces = config.network.interfaces;allowedTCPPorts = config.network.tcpPorts;
networking.firewall = {enable = true;trustedInterfaces = config.network.interfaces;allowedTCPPorts = config.network.tcpPorts;};networking.useDHCP = mkDefault true;networking.interfaces = { };};
networking.useDHCP = lib.mkDefault true;networking.interfaces = {};};
config.flake.modules.darwin.network ={ config, lib, ... }:letinherit (lib) types mkOption;in{# Named "network" to avoid conflicts with the "networking" options.# Not sure if it would even be a problem but oh well.options.network = {hostName = mkOption {type = types.str;example = "yuzu";description = "Host's unique name";};};config.networking.hostName = config.network.hostName;};