modules: networking: add 'wireless' option

This commit is contained in:
Bruno BELANYI 2021-05-05 12:27:07 +02:00
parent a03db294fe
commit 376e60d71e

View file

@ -1,13 +1,27 @@
{ lib, ... }: { config, lib, ... }:
let
cfg = config.my.networking;
in
{ {
options.my.networking.externalInterface = with lib; mkOption { options.my.networking = with lib; {
type = types.nullOr types.str; externalInterface = mkOption {
default = null; type = types.nullOr types.str;
example = "eth0"; default = null;
description = '' example = "eth0";
Name of the network interface that egresses to the internet. Used for description = ''
e.g. NATing internal networks. Name of the network interface that egresses to the internet. Used for
''; e.g. NATing internal networks.
'';
};
wireless = {
enable = mkEnableOption "wireless configuration";
};
}; };
config = lib.mkMerge [
(lib.mkIf cfg.wireless.enable {
networking.networkmanager.enable = true;
})
];
} }