diff options
author | Peter Simons <simons@cryp.to> | 2011-09-14 18:20:50 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2011-09-14 18:20:50 +0000 |
commit | eb6e1310b8774f3aed4c5675d09708f0df6199d3 (patch) | |
tree | 3297542b3cda78d38731abb65837f4553cd377a9 /modules/services/networking/gvpe.nix | |
parent | f5e8d35f8e76755febf97ca8f62b0700a8b6d20a (diff) | |
download | nixlib-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar nixlib-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.gz nixlib-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.bz2 nixlib-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.lz nixlib-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.xz nixlib-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.zst nixlib-eb6e1310b8774f3aed4c5675d09708f0df6199d3.zip |
strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
Diffstat (limited to 'modules/services/networking/gvpe.nix')
-rw-r--r-- | modules/services/networking/gvpe.nix | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/modules/services/networking/gvpe.nix b/modules/services/networking/gvpe.nix index 102de2bca2dd..594a2e80f345 100644 --- a/modules/services/networking/gvpe.nix +++ b/modules/services/networking/gvpe.nix @@ -1,32 +1,32 @@ # GNU Virtual Private Ethernet -{config, pkgs, ...}: +{config, pkgs, ...}: -let +let inherit (pkgs.lib) mkOption mkIf; cfg = config.services.gvpe; - finalConfig = if cfg.configFile != null then + finalConfig = if cfg.configFile != null then cfg.configFile else if cfg.configText != null then pkgs.writeTextFile { name = "gvpe.conf"; text = cfg.configText; } - else + else throw "You must either specify contents of the config file or the config file itself for GVPE"; - ifupScript = if cfg.ipAddress == null || cfg.subnet == null then - throw "Specify IP address and subnet (with mask) for GVPE" - else if cfg.nodename == null then - throw "You must set node name for GVPE" + ifupScript = if cfg.ipAddress == null || cfg.subnet == null then + throw "Specify IP address and subnet (with mask) for GVPE" + else if cfg.nodename == null then + throw "You must set node name for GVPE" else - (pkgs.writeTextFile { + (pkgs.writeTextFile { name = "gvpe-if-up"; text = '' #! /bin/sh - + export PATH=$PATH:${pkgs.iproute}/sbin ip link set $IFNAME up @@ -80,7 +80,7 @@ in udp-port = 655 mtu = 1480 ifname = vpn0 - + node = alpha hostname = alpha.example.org connect = always @@ -124,7 +124,7 @@ in config = mkIf cfg.enable { jobs.gvpe = { description = "GNU Virtual Private Ethernet node"; - + inherit startOn stopOn; preStart = '' |