1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/nixos/modules/config/vpnc.nix

42 lines
782 B
Nix
Raw Normal View History

{ config, lib, ... }:
2014-08-21 03:57:41 +01:00
with lib;
let
cfg = config.networking.vpnc;
mkServiceDef = name: value:
{
2014-08-31 18:00:54 +01:00
name = "vpnc/${name}.conf";
value = { text = value; };
2014-08-21 03:57:41 +01:00
};
in
{
options = {
networking.vpnc = {
services = mkOption {
type = types.attrsOf types.str;
2014-08-31 20:12:15 +01:00
default = {};
2015-07-04 07:48:27 +01:00
example = literalExample ''
{ test = '''
IPSec gateway 192.168.1.1
IPSec ID someID
IPSec secret secretKey
Xauth username name
Xauth password pass
''';
}
'';
2014-08-21 03:57:41 +01:00
description =
''
The names of cisco VPNs and their associated definitions
'';
};
};
};
2014-08-31 18:00:54 +01:00
config.environment.etc = mapAttrs' mkServiceDef cfg.services;
2014-08-21 03:57:41 +01:00
}