about summary refs log tree commit diff
path: root/modules/hardware/networking
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-05 20:12:56 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-05 20:12:56 -0700
commitf3657271d6ea2408d812d32eea9862b61e49f5d8 (patch)
treec6ea56f0616174024c7293ce032b7adacf7ea884 /modules/hardware/networking
parentrefactor security to a module (diff)
downloadworld-f3657271d6ea2408d812d32eea9862b61e49f5d8.tar.gz
refactor network configuration
Diffstat (limited to 'modules/hardware/networking')
-rw-r--r--modules/hardware/networking/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/hardware/networking/default.nix b/modules/hardware/networking/default.nix
new file mode 100644
index 0000000..d19388b
--- /dev/null
+++ b/modules/hardware/networking/default.nix
@@ -0,0 +1,11 @@
+{ config, lib, ... }:
+let cfg = config.my.hardware.networking;
+in {
+  options.my.hardware.networking = with lib; {
+    wireless = { enable = mkEnableOption "wireless configuration"; };
+  };
+
+  config = lib.mkMerge [
+    (lib.mkIf cfg.wireless.enable { networking.wireless.iwd.enable = true; })
+  ];
+}