summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-12-11 06:17:22 +0530
committersinanmohd <sinan@sinanmohd.com>2023-12-11 06:17:22 +0530
commit64b89e6dabacf2ffc18b36de458355796d8f3460 (patch)
tree0665800e312b7885dfd17c6db5270e225ae52db5
parent955e6c6d3d4a5c8a6c9f35aa0593f244effc7322 (diff)
modules/iwd: drop upstreamed changes
-rw-r--r--common.nix6
-rw-r--r--flake.lock18
-rw-r--r--modules/iwd.nix82
3 files changed, 10 insertions, 96 deletions
diff --git a/common.nix b/common.nix
index 1e7ea3a..2890cea 100644
--- a/common.nix
+++ b/common.nix
@@ -8,15 +8,11 @@ let
host = config.networking.hostName;
in
{
- disabledModules = [
- "services/networking/pppd.nix"
- "services/networking/iwd.nix"
- ];
+ disabledModules = [ "services/networking/pppd.nix" ];
imports = [
./modules/userdata.nix
./modules/dev.nix
./modules/pppd.nix
- ./modules/iwd.nix
];
# boot
diff --git a/flake.lock b/flake.lock
index 326b447..555731f 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1701436327,
- "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
+ "lastModified": 1702151865,
+ "narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=",
"owner": "NixOs",
"repo": "nixpkgs",
- "rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
+ "rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd",
"type": "github"
},
"original": {
@@ -18,11 +18,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1701568804,
- "narHash": "sha256-iwr1fjOCvlirVL/xNvOTwY9kg3L/F3TC/7yh/QszaPI=",
+ "lastModified": 1702148972,
+ "narHash": "sha256-h2jODFP6n+ABrUWcGRSVPRFfLOkM9TJ2pO+h+9JcaL0=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "dc01248a9c946953ad4d438b0a626f5c987a93e4",
+ "rev": "b8f33c044e51de6dde3ad80a9676945e0e4e3227",
"type": "github"
},
"original": {
@@ -46,11 +46,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
- "lastModified": 1701728052,
- "narHash": "sha256-7lOMc3PtW5a55vFReBJLLLOnopsoi1W7MkjJ93jPV4E=",
+ "lastModified": 1702177193,
+ "narHash": "sha256-J2409SyXROoUHYXVy9h4Pj0VU8ReLuy/mzBc9iK4DBg=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "e91ece6d2cf5a0ae729796b8f0dedceab5107c3d",
+ "rev": "d806e546f96c88cd9f7d91c1c19ebc99ba6277d9",
"type": "github"
},
"original": {
diff --git a/modules/iwd.nix b/modules/iwd.nix
deleted file mode 100644
index 3b11368..0000000
--- a/modules/iwd.nix
+++ /dev/null
@@ -1,82 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- inherit (lib)
- mkEnableOption mkIf mkOption types
- recursiveUpdate;
-
- cfg = config.networking.wireless.iwd;
- ini = pkgs.formats.ini { };
- defaults = {
- # without UseDefaultInterface, sometimes wlan0 simply goes AWOL with NetworkManager
- # https://iwd.wiki.kernel.org/interface_lifecycle#interface_management_in_iwd
- General.UseDefaultInterface = with config.networking.networkmanager; (enable && (wifi.backend == "iwd"));
- };
- configFile = ini.generate "main.conf" (recursiveUpdate defaults cfg.settings);
-
-in
-{
- options.networking.wireless.iwd = {
- enable = mkEnableOption (lib.mdDoc "iwd");
-
- package = mkOption {
- type = types.package;
- default = pkgs.iwd;
- defaultText = lib.literalExpression "pkgs.iwd";
- description = lib.mdDoc ''
- The iwd package to use.
- '';
- };
-
- settings = mkOption {
- type = ini.type;
- default = { };
-
- example = {
- Settings.AutoConnect = true;
-
- Network = {
- EnableIPv6 = true;
- RoutePriorityOffset = 300;
- };
- };
-
- description = lib.mdDoc ''
- Options passed to iwd.
- See [here](https://iwd.wiki.kernel.org/networkconfigurationsettings) for supported options.
- '';
- };
- };
-
- config = mkIf cfg.enable {
- assertions = [{
- assertion = !config.networking.wireless.enable;
- message = ''
- Only one wireless daemon is allowed at the time: networking.wireless.enable and networking.wireless.iwd.enable are mutually exclusive.
- '';
- }];
-
- environment.etc."iwd/${configFile.name}".source = configFile;
-
- # for iwctl
- environment.systemPackages = [ cfg.package ];
-
- services.dbus.packages = [ cfg.package ];
-
- systemd.packages = [ cfg.package ];
-
- systemd.network.links."80-iwd" = {
- matchConfig.Type = "wlan";
- linkConfig.NamePolicy = "keep kernel";
- };
-
- systemd.services.iwd = {
- path = [ config.networking.resolvconf.package ];
- wantedBy = [ "multi-user.target" ];
- restartTriggers = [ configFile ];
- serviceConfig.ReadWritePaths = "-/etc/resolv.conf";
- };
- };
-
- meta.maintainers = with lib.maintainers; [ dtzWill ];
-}