summary refs log tree commit diff
path: root/modules/services/networking/gvpe.nix
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2009-11-18 15:11:54 +0000
committerMichael Raskin <7c6f434c@mail.ru>2009-11-18 15:11:54 +0000
commitea2417ac870bd93218e6372970aa7ded32b6690e (patch)
treedbc0108c23e0bdc5da89438b2737b0ad9b79c3e4 /modules/services/networking/gvpe.nix
parent26f83d65e4be2448753f55e9666f3e386c6ec3f7 (diff)
downloadnixpkgs-ea2417ac870bd93218e6372970aa7ded32b6690e.tar
nixpkgs-ea2417ac870bd93218e6372970aa7ded32b6690e.tar.gz
nixpkgs-ea2417ac870bd93218e6372970aa7ded32b6690e.tar.bz2
nixpkgs-ea2417ac870bd93218e6372970aa7ded32b6690e.tar.lz
nixpkgs-ea2417ac870bd93218e6372970aa7ded32b6690e.tar.xz
nixpkgs-ea2417ac870bd93218e6372970aa7ded32b6690e.tar.zst
nixpkgs-ea2417ac870bd93218e6372970aa7ded32b6690e.zip
Apply Eelco Dolstra's formatting suggestions
svn path=/nixos/trunk/; revision=18436
Diffstat (limited to 'modules/services/networking/gvpe.nix')
-rw-r--r--modules/services/networking/gvpe.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/services/networking/gvpe.nix b/modules/services/networking/gvpe.nix
index 7f5c2285a55..72b45df26af 100644
--- a/modules/services/networking/gvpe.nix
+++ b/modules/services/networking/gvpe.nix
@@ -4,7 +4,9 @@
 
 let 
   inherit (pkgs.lib) mkOption mkIf;
+
   cfg = config.services.gvpe;
+
   finalConfig = if cfg.configFile != null then 
     cfg.configFile
   else if cfg.configText != null then
@@ -14,6 +16,7 @@ let
     }
   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 
@@ -34,10 +37,12 @@ let
     '';
     executable = true;
   });
+
   exec = "${pkgs.gvpe}/sbin/gvpe -c /var/gvpe -D ${cfg.nodename} "
     + " ${cfg.nodename}.pid-file=/var/gvpe/gvpe.pid"
     + " ${cfg.nodename}.if-up=if-up"
     + " &> /var/log/gvpe";
+
   inherit (cfg) startOn stopOn;
 in
 
@@ -116,8 +121,7 @@ in
       };
     };
   };
-  config = mkIf cfg.enable 
-  {
+  config = mkIf cfg.enable {
     jobs.gvpe = {
       description = "GNU Virtual Private Ethernet node";
       
@@ -129,7 +133,7 @@ in
         chown root /var/gvpe
         chmod 700 /var/gvpe
         cp ${finalConfig} /var/gvpe/gvpe.conf
-	cp ${ifupScript} /var/gvpe/if-up
+        cp ${ifupScript} /var/gvpe/if-up
       '';
 
       inherit exec;