summaryrefslogtreecommitdiffstats
path: root/2configs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-11-03 13:29:14 +0100
committermakefu <github@syntax-fehler.de>2017-11-03 13:29:14 +0100
commitee95b7bac9028e54e88e3703990cde137c05c39c (patch)
tree83627f19da9cb0b335869b0b893ee45fc4ea4821 /2configs
parent2012a477364c6067ee00372f75e138ebcaf90336 (diff)
ma lancache-dns: add storage server names
Diffstat (limited to '2configs')
-rw-r--r--2configs/lanparty/lancache-dns.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/2configs/lanparty/lancache-dns.nix b/2configs/lanparty/lancache-dns.nix
index 4b4ebf0a0..f03fe8773 100644
--- a/2configs/lanparty/lancache-dns.nix
+++ b/2configs/lanparty/lancache-dns.nix
@@ -21,6 +21,13 @@ let
stateDir = "/var/lib/unbound";
user = "unbound";
upstream-server = "8.8.8.8";
+ local_ip = "192.168.1.10";
+ extra-config = pkgs.writeText "local.conf" ''
+ server:
+ local-data: "piratebox. A ${local-ip}"
+ local-data: "store. A ${local-ip}"
+ local-data: "share. A ${local-ip}"
+ '';
in {
services.unbound = {
enable = true;
@@ -29,6 +36,7 @@ in {
forwardAddresses = [ upstream-server ];
extraConfig = ''
include: "${stateDir}/lancache/*.conf"
+ include: "${extra-config}"
'';
};
services.dnscrypt-proxy.enable = lib.mkForce false;
@@ -42,7 +50,8 @@ in {
path = [ pkgs.gawk pkgs.iproute pkgs.gnused ];
script = ''
set -xeu
- current_ip=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
+ # current_ip=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
+ current_ip=${local_ip}
old_ip=10.1.1.250
mkdir -p ${stateDir}
rm -rvf ${stateDir}/lancache
[cgit] Unable to lock slot /tmp/cgit/66000000.lock: No such file or directory (2)