It made more sense earlier to have a network config but now it's
basically useless so better to set the options directly.
LJIFQVLYZAJ6BUZRJKWPADWILVW4W7JJ3KQAMZIY5FPBIE6E7LDQC O5SNUGP5YLA6TCHW4VS66GKHBK7UZMCU4LVIAAZEDD2YDV6UAUTQC RTBMBSBABSGTRICJ4AWBKWO3JJHBRKV6FGOMYPDD7X6SS6X35ZIQC ACIH4ICHLFEBDGCFL4ZHMKMBILEQBU3VE4PE3MSXG5JKO2L2PYKQC ZDOH7B6FV7KM7QJEMOW2LIEXL3H45HL3C6LKDHTG4TEDWQUVYDJQC YVII7NUI5Z6DPUDQZG2ZVJ6QNQRCEUYX5547IYCMPZI7GJ3GDZQAC V2RX2Y7VB7Y3BHX3ALK4GTCMFJATMLCKIAT4U3XCYZZZIUBIIZ5QC FREUCXPWPGLUZQSHQ7YXBTDFFJ5ORT43FM7V3SZXA64C4HYU6QKQC 2CMYRHKT4X3JQOH23IYC2MFSNZTEEWPFMQK43FDLCGYU4JWCV3FQC CTCIAQGFIKAIP7JGXIBYWNGE7A5QMF6U662OV3KZOT4HKIWOSTZQC UBB7TTAXVPQQCOVHACKWXSPV2NPARSHREYJB6J3RSEDZZIXPFGOAC 4HN5LZRSOAODRIM57WBB35C66VO7BR4PGFINLUMTGNHULEK43CEQC GSMQ5BSY6CHOUNDF76N2O52NXB3QU5F7V52RXKJABPOFNSCVIZGAC UZUCVVZYTCBURTGFJZUQJPQCNKB43PP6LVT7ACTSMSB442GRVNYQC 2VVG5MJTB2PG2GENMF6WH7DWNX6NZ6P7UTWD5HT4SDJFSWAIIA3AC };{ config, lib, ... }:letin{# 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 {example = "yuzu";description = "Host's unique name";};};config.networking.hostName = config.network.hostName;};type = str;inherit (lib.types) str;inherit (lib.options) mkOption;}flake.modules.darwin.network =networking.firewall = {enable = true;trustedInterfaces = config.network.interfaces;allowedTCPPorts = config.network.tcpPorts;};networking.useDHCP = mkDefault true;networking.interfaces = { };};networking.domain = mkIf (config.network.domain != null) config.network.domain;config = {networking.networkmanager = {enable = true;wifi.powersave = false;};programs.nm-applet.enable = true;users.users.jam.extraGroups = [ "networkmanager" ];networking.hostName = config.network.hostName;tcpPorts = mkOption {default = [ 22 ];example = [2280443];description = "TCP ports to allow through the firewall";};};type = listOf (either int str);domain = mkOption {default = null;example = "example.com";description = "Network domain (optional)";};type = nullOr str;interfaces = mkOption {example = [ "ts0" ];default = [ "ts0" ];description = "Network interfaces";};type = listOf str;hostName = mkOption {example = "yuzu";description = "Host's unique name";};type = str;{{ config, lib, ... }:let;inherit (lib.options) mkOption;inherit (lib) mkDefault;in{# Named "network" to avoid conflicts with the "networking" options.# Not sure if it would even be a problem but oh well.options.network = {inherit (lib.modules) mkIf;inherit (lib.types)listOfnullOrstrinteitherflake.modules.nixos.network =
{flake.modules.nixos.networking ={ lib, ... }:letinherit (lib.types) nullOr str;inherit (lib.options) mkOption;inherit (lib) mkDefault;in{options.network = {domain = mkOption {type = nullOr str;default = null;example = "example.com";description = "Network domain (optional)";};};config = {networking.networkmanager = {enable = true;wifi.powersave = false;};programs.nm-applet.enable = true;users.users.jam.extraGroups = [ "networkmanager" ];networking.firewall = {enable = true;trustedInterfaces = [ "ts0" ];allowedTCPPorts = [ 22 ];};networking.useDHCP = mkDefault true;networking.interfaces = { };};};}