From f3657271d6ea2408d812d32eea9862b61e49f5d8 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 5 Apr 2022 20:12:56 -0700 Subject: refactor network configuration --- modules/hardware/default.nix | 2 +- modules/hardware/networking/default.nix | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 modules/hardware/networking/default.nix (limited to 'modules') diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 79b062e..73b6fbd 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -1,5 +1,5 @@ { ... }: { - imports = [ ./sound ]; + imports = [ ./sound ./networking ]; } 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; }) + ]; +} -- cgit v1.2.3