Skip to content

Commit

Permalink
nixos/tinc: Fix tinc cli wrapper for tinc 1.0.
Browse files Browse the repository at this point in the history
tinc prior to 1.1 doesn't have the `tinc` executable,
and `tincd` isn't of any use while the daemon already runs.
  • Loading branch information
florianjacob committed Sep 17, 2017
1 parent 8180085 commit 8cea87c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nixos/modules/services/networking/tinc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
'';
};
Expand Down

0 comments on commit 8cea87c

Please sign in to comment.