modules: hardware: put modules into folders

This commit is contained in:
Bruno BELANYI 2021-09-25 15:08:43 +02:00
parent 7bec7ae0f9
commit 836b54b8eb
7 changed files with 6 additions and 6 deletions

View file

@ -0,0 +1,27 @@
{ config, lib, ... }:
let
cfg = config.my.hardware.networking;
in
{
options.my.hardware.networking = with lib; {
externalInterface = mkOption {
type = types.nullOr types.str;
default = null;
example = "eth0";
description = ''
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;
})
];
}