ma lancache-dns: refactor
This commit is contained in:
parent
5a25b91d1d
commit
9f8aa6abae
@ -1,6 +1,17 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
with import <stockholm/lib>;
|
with import <stockholm/lib>;
|
||||||
let
|
let
|
||||||
|
upstream-server = "8.8.8.8";
|
||||||
|
local_ip = "192.168.10.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}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
# see https://github.com/zeropingheroes/lancache for full docs
|
# see https://github.com/zeropingheroes/lancache for full docs
|
||||||
lancache-dns = pkgs.stdenv.mkDerivation rec {
|
lancache-dns = pkgs.stdenv.mkDerivation rec {
|
||||||
name = "lancache-dns-2017-06-28";
|
name = "lancache-dns-2017-06-28";
|
||||||
@ -11,8 +22,9 @@ let
|
|||||||
rev = "420aa62";
|
rev = "420aa62";
|
||||||
sha256 = "0ik7by7ripdv2avyy5kk9jp1i7rz9ksc8xmg7n9iik365q9pv94m";
|
sha256 = "0ik7by7ripdv2avyy5kk9jp1i7rz9ksc8xmg7n9iik365q9pv94m";
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
# here we can chance to edit `includes/proxy-cache-paths.conf`
|
# here we have the chance to edit `includes/proxy-cache-paths.conf`
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r * $out/
|
cp -r * $out/
|
||||||
@ -20,14 +32,6 @@ let
|
|||||||
};
|
};
|
||||||
stateDir = "/var/lib/unbound";
|
stateDir = "/var/lib/unbound";
|
||||||
user = "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 {
|
in {
|
||||||
services.unbound = {
|
services.unbound = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user