From 460a4b08328a3f5f97042c8500303421a750abd6 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Tue, 24 Oct 2017 23:55:05 +0200 Subject: networkmanager_strongswan: fix package Added the boolean option: networking.networkmanager.enableStrongSwan which enables the networkmanager_strongswan plugin and adds strongswanNM to the dbus packages. This was contributed by @wucke13, @eqyiel and @globin. Fixes: #29873 --- nixos/modules/services/networking/networkmanager.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/networking/networkmanager.nix') diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 6bdae32f72bb..382f74606cae 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -241,6 +241,19 @@ in { A list of scripts which will be executed in response to network events. ''; }; + + enableStrongSwan = mkOption { + type = types.bool; + default = false; + description = '' + Enable the StrongSwan plugin. + + If you enable this option the + networkmanager_strongswan plugin will be added to + the option + so you don't need to to that yourself. + ''; + }; }; }; @@ -339,7 +352,11 @@ in { security.polkit.extraConfig = polkitConf; - services.dbus.packages = cfg.packages; + networking.networkmanager.packages = + mkIf cfg.enableStrongSwan [ pkgs.networkmanager_strongswan ]; + + services.dbus.packages = + optional cfg.enableStrongSwan pkgs.strongswanNM ++ cfg.packages; services.udev.packages = cfg.packages; }; -- cgit 1.4.1