summary refs log tree commit diff
path: root/nixos/modules/services/networking/tinc.nix
diff options
context:
space:
mode:
authorFlorian Jacob <projects+git@florianjacob.de>2017-09-16 22:05:25 +0200
committerFlorian Jacob <projects+git@florianjacob.de>2017-09-17 10:46:12 +0200
commit8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f (patch)
treebe4241e3929572466dce0dfe0c08da353939d8ad /nixos/modules/services/networking/tinc.nix
parent818008573373c8c0a8118b7b024346e9aa2232a0 (diff)
downloadnixpkgs-8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f.tar
nixpkgs-8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f.tar.gz
nixpkgs-8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f.tar.bz2
nixpkgs-8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f.tar.lz
nixpkgs-8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f.tar.xz
nixpkgs-8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f.tar.zst
nixpkgs-8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f.zip
nixos/tinc: Fix tinc cli wrapper for tinc 1.0.
tinc prior to 1.1 doesn't have the `tinc` executable,
and `tincd` isn't of any use while the daemon already runs.
Diffstat (limited to 'nixos/modules/services/networking/tinc.nix')
-rw-r--r--nixos/modules/services/networking/tinc.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/tinc.nix b/nixos/modules/services/networking/tinc.nix
index 7a786b54ccb..d5db328310c 100644
--- a/nixos/modules/services/networking/tinc.nix
+++ b/nixos/modules/services/networking/tinc.nix
@@ -199,8 +199,10 @@ in
         buildInputs = [ pkgs.makeWrapper ];
         buildCommand = ''
           mkdir -p $out/bin
-          ${concatStringsSep "\n" (mapAttrsToList (network: data: ''
-              makeWrapper ${data.package}/bin/tinc "$out/bin/tinc.${network}" --add-flags "--pidfile=/run/tinc.${network}.pid"
+          ${concatStringsSep "\n" (mapAttrsToList (network: data:
+            optionalString (versionAtLeast data.package.version "1.1pre") ''
+              makeWrapper ${data.package}/bin/tinc "$out/bin/tinc.${network}" \
+                --add-flags "--pidfile=/run/tinc.${network}.pid"
             '') cfg.networks)}
         '';
       };