diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-17 19:49:36 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-17 19:49:36 +0200 |
commit | 0c5a94f1e629bfbbe905d82ab9c4c391d636ce6b (patch) | |
tree | 6386dc075a2e352185ff44333e772bfcc7c20a83 /custom/tinc | |
parent | 3679845f4a46b1078e166b40ba3fc968b6e98af2 (diff) | |
download | nixos-0c5a94f1e629bfbbe905d82ab9c4c391d636ce6b.tar nixos-0c5a94f1e629bfbbe905d82ab9c4c391d636ce6b.tar.gz nixos-0c5a94f1e629bfbbe905d82ab9c4c391d636ce6b.tar.bz2 nixos-0c5a94f1e629bfbbe905d82ab9c4c391d636ce6b.tar.xz nixos-0c5a94f1e629bfbbe905d82ab9c4c391d636ce6b.zip |
persistent macs on yggdrasil
Diffstat (limited to 'custom/tinc')
-rw-r--r-- | custom/tinc/yggdrasil.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix index 91c1add8..2da48486 100644 --- a/custom/tinc/yggdrasil.nix +++ b/custom/tinc/yggdrasil.nix | |||
@@ -80,6 +80,13 @@ in { | |||
80 | ${optionalString cfg.connect "ConnectTo = ymir"} | 80 | ${optionalString cfg.connect "ConnectTo = ymir"} |
81 | ''; | 81 | ''; |
82 | scripts = { | 82 | scripts = { |
83 | "tinc-up" = '' | ||
84 | #!${pkgs.stdenv.shell} | ||
85 | |||
86 | set -e | ||
87 | MACFILE="/var/db/$NETNAME.mac" | ||
88 | [ -e $MACFILE ] && ip link set dev $INTERFACE address `cat $MACFILE` || cat /sys/class/net/$INTERFACE/address >$MACFILE | ||
89 | ''; | ||
83 | "hosts/heimdallr-up" = '' | 90 | "hosts/heimdallr-up" = '' |
84 | #!${pkgs.stdenv.shell} | 91 | #!${pkgs.stdenv.shell} |
85 | 92 | ||