From 3feb1de94aae4d978207ad8a73f0c78efd817bb9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 29 Oct 2017 01:52:59 +0200 Subject: Use sudo --- custom/tinc/yggdrasil.nix | 61 +++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 26 deletions(-) (limited to 'custom/tinc') diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix index 035b9b10..d4bf26f1 100644 --- a/custom/tinc/yggdrasil.nix +++ b/custom/tinc/yggdrasil.nix @@ -4,8 +4,26 @@ with lib; let cfg = config.services.yggdrasilTinc; -in { + borealis-up = pkgs.writeScript "borealis-up.sh" '' + #!${pkgs.stdenv.shell} + ${pkgs.nettools}/bin/route add -net 10.141.1.0 netmask 255.255.255.0 gw 10.141.1.1 dev $INTERFACE metric 9999 + ${optionalString cfg.useDNS '' + ${pkgs.openresolv}/bin/resolvconf -m 0 -a tinc.yggdrasil <