From 6681c66db865a65a1ccdd321a6100c8d50887ac5 Mon Sep 17 00:00:00 2001 From: Tomasz Kontusz Date: Sat, 7 Nov 2015 14:06:33 +0100 Subject: [PATCH] networkmanager service: add unmanaged option --- .../services/networking/networkmanager.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 39dcd5fef60..7df194fa419 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -14,9 +14,10 @@ let plugins=keyfile [keyfile] - ${optionalString (config.networking.hostName != "") '' - hostname=${config.networking.hostName} - ''} + ${optionalString (config.networking.hostName != "") + ''hostname=${config.networking.hostName}''} + ${optionalString (cfg.unmanaged != []) + ''unmanaged-devices=${lib.concatStringsSep ";" cfg.unmanaged}''} [logging] level=WARN @@ -97,6 +98,16 @@ in { ''; }; + unmanaged = mkOption { + type = types.listOf types.string; + default = []; + description = '' + List of interfaces that will not be managed by NetworkManager. + Interface name can be specified here, but if you need more fidelity + see "Device List Format" in NetworkManager.conf man page. + ''; + }; + # Ugly hack for using the correct gnome3 packageSet basePackages = mkOption { type = types.attrsOf types.path;