2021-05-05 12:27:07 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
2021-05-29 16:41:59 +02:00
|
|
|
cfg = config.my.hardware.networking;
|
2021-05-05 12:27:07 +02:00
|
|
|
in
|
2021-02-18 01:08:35 +01:00
|
|
|
{
|
2021-05-29 16:41:59 +02:00
|
|
|
options.my.hardware.networking = with lib; {
|
2021-05-05 12:27:07 +02:00
|
|
|
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";
|
|
|
|
};
|
2021-02-18 01:08:35 +01:00
|
|
|
};
|
2021-05-05 12:27:07 +02:00
|
|
|
|
|
|
|
config = lib.mkMerge [
|
|
|
|
(lib.mkIf cfg.wireless.enable {
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
})
|
|
|
|
];
|
2021-02-18 01:08:35 +01:00
|
|
|
}
|