aboutsummaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-07-29 06:54:49 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-07-29 06:54:49 -0500
commite29dd8a2283399b7e046937340509d5aec4b52ba (patch)
treeaa679e70fe55cb620698ab1695eadf23f8a2cdba /modules/system
parentd2aecd69c17fa64305c07333686576152432993d (diff)
changes
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/nixos/boot.nix5
-rw-r--r--modules/system/nixos/default.nix1
-rw-r--r--modules/system/nixos/networking/default.nix27
-rw-r--r--modules/system/nixos/networking/iwd.nix23
-rw-r--r--modules/system/nixos/networking/networkd.nix44
-rw-r--r--modules/system/nixos/networking/resolved.nix19
-rw-r--r--modules/system/nixos/networking/wpasupplicant.nix15
-rw-r--r--modules/system/options.nix41
8 files changed, 1 insertions, 174 deletions
diff --git a/modules/system/nixos/boot.nix b/modules/system/nixos/boot.nix
index 50d66fe..aefc6da 100644
--- a/modules/system/nixos/boot.nix
+++ b/modules/system/nixos/boot.nix
@@ -74,10 +74,7 @@ in {
};
});
- system.etc.overlay = {
- enable = true;
- mutable = true; # necessary for installing secrets into etc
- };
+ system.etc.overlay.enable = true;
system.nixos-init.enable = true;
# store journald logs in memory
diff --git a/modules/system/nixos/default.nix b/modules/system/nixos/default.nix
index 035c5be..baacaa0 100644
--- a/modules/system/nixos/default.nix
+++ b/modules/system/nixos/default.nix
@@ -1,6 +1,5 @@
{
imports = [
- ./networking
./boot.nix
./audio.nix
./bluetooth.nix
diff --git a/modules/system/nixos/networking/default.nix b/modules/system/nixos/networking/default.nix
deleted file mode 100644
index f6baaac..0000000
--- a/modules/system/nixos/networking/default.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- imports = [
- ./resolved.nix
-
- ./networkd.nix
- ./iwd.nix
- ./wpasupplicant.nix
- ];
-
- networking = {
- firewall = {
- enable = true;
- checkReversePath = "loose";
- };
-
- # Disable default networking stuff
- dhcpcd.enable = false;
- useDHCP = false;
- networkmanager.enable = false;
- };
-
- boot.kernel.sysctl = {
- # disable all ipv6
- "net.ipv6.conf.all.disable_ipv6" = 1;
- "net.ipv6.conf.default.disable_ipv6" = 1;
- };
-}
diff --git a/modules/system/nixos/networking/iwd.nix b/modules/system/nixos/networking/iwd.nix
deleted file mode 100644
index 0c5bdfa..0000000
--- a/modules/system/nixos/networking/iwd.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- lib,
- config,
- ...
-}: let
- cfg = config.collinux.system.network;
- enabled = cfg.wireless.dynamic;
-in
- lib.mkIf enabled {
- networking = {
- wireless.iwd = {
- enable = true;
- settings = {
- General = {
- EnableNetworkConfiguration = false; # always let networkd handle this
- AddressRandomization = "once";
- AddressRandomizationRange = "full";
- };
- Network.NameResolvingService = "systemd"; # either systemd or resolvconf
- };
- };
- };
- }
diff --git a/modules/system/nixos/networking/networkd.nix b/modules/system/nixos/networking/networkd.nix
deleted file mode 100644
index 2c7f580..0000000
--- a/modules/system/nixos/networking/networkd.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- # lib,
- config,
- ...
-}: let
- cfg = config.collinux.system.network;
- dhcp_enabled = cfg.static == null;
-
- device =
- if (cfg.wireless == null)
- then "eth0"
- else "wl*";
-in {
- networking.useNetworkd = true;
- systemd.network = {
- enable = true;
-
- wait-online = {
- enable = true;
- ignoredInterfaces = ["docker0"];
- anyInterface = true;
- };
-
- networks."11-default" =
- if dhcp_enabled
- then {
- name = device;
- networkConfig.DHCP = "yes";
-
- # never accept dhcp dns
- dhcpV4Config.UseDNS = "no";
- dhcpV6Config.UseDNS = "no";
- }
- else {
- name = device;
- networkConfig = {
- Address = cfg.static.ip;
- Gateway = cfg.static.gateway;
- DHCP = "no";
- # DNS is managed by systemd-resolved (not specified here)
- };
- };
- };
-}
diff --git a/modules/system/nixos/networking/resolved.nix b/modules/system/nixos/networking/resolved.nix
deleted file mode 100644
index e49e004..0000000
--- a/modules/system/nixos/networking/resolved.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{config, ...}: {
- networking.resolvconf.enable = false;
-
- networking.nameservers = [
- "9.9.9.9#dns.quad9.net"
- "149.112.112.112#dns.quad9.net"
- ];
-
- services.resolved = {
- enable = true;
- settings.Resolve = {
- DNSOverTLS = true;
- DNSSEC = "allow-downgrade";
-
- LLMNR = false;
- MulticastDNS = false;
- };
- };
-}
diff --git a/modules/system/nixos/networking/wpasupplicant.nix b/modules/system/nixos/networking/wpasupplicant.nix
deleted file mode 100644
index 8314095..0000000
--- a/modules/system/nixos/networking/wpasupplicant.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- config,
- lib,
- ...
-}: let
- cfg = config.collinux.system.network.wireless;
- enabled = cfg.static != null;
-in
- lib.mkIf enabled {
- networking.wireless = {
- enable = true;
- networks.${cfg.static.ssid}.pskRaw = "ext:psk";
- secretsFile = cfg.static.pskFile;
- };
- }
diff --git a/modules/system/options.nix b/modules/system/options.nix
index a6db575..cbc8cd1 100644
--- a/modules/system/options.nix
+++ b/modules/system/options.nix
@@ -5,7 +5,6 @@
...
}: let
inherit (lib) mkOption mkEnableOption;
- inherit (my-lib.netTypes {inherit lib;}) ipAddr ipAddrCidr;
inherit (my-lib.options {inherit lib config;}) mkThemeOption;
in {
options.collinux.system = {
@@ -26,46 +25,6 @@ in {
secureBoot.enable = mkEnableOption "lanzaboote";
};
- network = {
- static = lib.mkOption {
- description = "Set a static IP address for this device on this network. Leave unset to use DHCP";
- type = lib.types.nullOr (lib.types.submodule {
- options = {
- ip = mkOption {
- description = "IP address";
- type = ipAddrCidr;
- };
- gateway = mkOption {
- description = "default gateway";
- type = ipAddr;
- };
- };
- });
- default = null;
- };
-
- wireless = {
- static = lib.mkOption {
- description = "Set a preconfigured SSID and PSK for the wireless config";
- type = lib.types.nullOr (lib.types.submodule {
- options = {
- ssid = mkOption {
- description = "SSID for this network";
- type = lib.types.str;
- };
- pskFile = mkOption {
- description = "Absolute path to a file containing the pre-shared key for this network in the form `psk:<wifi psk>`";
- type = lib.types.str;
- example = "/run/secrets.d/wifi-psk";
- };
- };
- });
- default = null;
- };
- dynamic = lib.mkEnableOption "Enable dynamically joining wireless networks with iwd";
- };
- };
-
audio.enable = mkEnableOption "pipewire and wireplumber";
bluetooth.enable = mkEnableOption "bluetooth";
printing.enable = mkEnableOption "cups printing server";