diff options
author | Bas van Dijk <v.dijk.bas@gmail.com> | 2017-10-24 23:55:05 +0200 |
---|---|---|
committer | Bas van Dijk <v.dijk.bas@gmail.com> | 2017-11-30 23:03:32 +0100 |
commit | 460a4b08328a3f5f97042c8500303421a750abd6 (patch) | |
tree | 7bbd7b4d7ebd803d042ca9de3d1f576d8bbdeff7 /nixos/modules/services/networking/networkmanager.nix | |
parent | ef8933233b954a28ce8981ec831713cc7a0afc6d (diff) |
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
Diffstat (limited to 'nixos/modules/services/networking/networkmanager.nix')
-rw-r--r-- | nixos/modules/services/networking/networkmanager.nix | 19 |
1 files changed, 18 insertions, 1 deletions
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. + </para><para> + If you enable this option the + <literal>networkmanager_strongswan</literal> plugin will be added to + the <option>networking.networkmanager.packages</option> 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; }; |