From 9e9ef7b598188b7c92be39a761748d6cac91a3f8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 18 Feb 2021 00:08:35 +0000 Subject: [PATCH] modules: add 'networking.externalInterface' option --- modules/default.nix | 1 + modules/networking.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 modules/networking.nix diff --git a/modules/default.nix b/modules/default.nix index 41f6110..8af74a9 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -4,6 +4,7 @@ { imports = [ ./language.nix + ./networking.nix ./nix.nix ./packages.nix ./users.nix diff --git a/modules/networking.nix b/modules/networking.nix new file mode 100644 index 0000000..28ba108 --- /dev/null +++ b/modules/networking.nix @@ -0,0 +1,13 @@ +{ lib, ... }: + +{ + options.my.networking.externalInterface = with lib; 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. + ''; + }; +}