diff --git a/coredns/config b/coredns/config new file mode 100644 index 0000000..f34631b --- /dev/null +++ b/coredns/config @@ -0,0 +1,29 @@ +packetlost.dev { + hosts ${./coredns/packetlost.dev.hosts} packetlost.dev { + fallthrough + } + bind enp4s0f1 +} +ngp.computer { + hosts ${./coredns/ngp.computer.hosts} ngp.computer { + fallthrough + } + bind enp4s0f1 +} +localhost { + hosts ${./coredns/localhost.hosts} localhost { + fallthrough + } + bind enp4s0f1 +} +. { + # NextDNS + forward . tls://2a07:a8c0::dd:2feb:853 tls://2a07:a8c1::dd:2feb:853 tls://45.90.28.93:853 tls://45.90.30.93:853 { + tls_servername dd2feb.dns.nextdns.io + health_check 5s + } + bind enp4s0f1 + cache + errors + log +} diff --git a/coredns/ngp.computer.hosts b/coredns/ngp.computer.hosts index 04f0145..591cdf8 100644 --- a/coredns/ngp.computer.hosts +++ b/coredns/ngp.computer.hosts @@ -1,2 +1,5 @@ 192.168.1.3 img.ngp.computer +192.168.1.3 misaki.ngp.computer + fe80::9ab7:85ff:fe1e:dfe8 img.ngp.computer +fe80::9ab7:85ff:fe1e:dfe8 misaki.ngp.computer diff --git a/coredns/packetlost.dev.hosts b/coredns/packetlost.dev.hosts index 6f291aa..e10f446 100644 --- a/coredns/packetlost.dev.hosts +++ b/coredns/packetlost.dev.hosts @@ -8,6 +8,7 @@ fe80::9ab7:85ff:fe1e:dfe8 nats.packetlost.dev # LAN Hosts 192.168.1.3 misaki.packetlost.dev misaki +192.168.1.3 cache.packetlost.dev cache #fe80::9ab7:85ff:fe1e:dfe8 misaki.packetlost.dev misaki 192.168.1.5 komoe.packetlost.dev komoe 192.168.1.6 rainbow.packetlost.dev rainbow diff --git a/noah-home.nix b/noah-home.nix index ffab4bc..ca033f7 100644 --- a/noah-home.nix +++ b/noah-home.nix @@ -92,7 +92,7 @@ in programs.fish.enable = true; programs.neovim = { - package = unstable.neovim-unwrapped; + #package = unstable.neovim-unwrapped; enable = true; defaultEditor = true; extraPackages = with pkgs; [ diff --git a/packages.nix b/packages.nix index 9499f10..4a65778 100644 --- a/packages.nix +++ b/packages.nix @@ -60,6 +60,7 @@ in plan9port vis rc + ncdu # ZFS / filesystem stuff zfs diff --git a/services.nix b/services.nix index a3bc3fa..7af1473 100644 --- a/services.nix +++ b/services.nix @@ -103,37 +103,7 @@ in services.coredns = { enable = true; - config = '' - packetlost.dev { - hosts ${./coredns/packetlost.dev.hosts} packetlost.dev { - fallthrough - } - bind enp4s0f1 - } - ngp.computer { - hosts ${./coredns/ngp.computer.hosts} ngp.computer { - fallthrough - } - bind enp4s0f1 - } - localhost { - hosts ${./coredns/localhost.hosts} localhost { - fallthrough - } - bind enp4s0f1 - } - . { - # NextDNS - forward . tls://2a07:a8c0::dd:2feb:853 tls://2a07:a8c1::dd:2feb:853 tls://45.90.28.93:853 tls://45.90.30.93:853 { - tls_servername dd2feb.dns.nextdns.io - health_check 5s - } - bind enp4s0f1 - cache - errors - log - } - ''; + config = lib.readFile ./coredns/config; }; services.nats = { @@ -282,6 +252,12 @@ in }; }; + services.nix-serve = { + enable = true; + secretKeyFile = "/srv/cache/cache-priv-key.pem"; + #openFirewall = true; + }; + services.plex = { enable = true; openFirewall = false; # we proxy this with nginx @@ -358,6 +334,10 @@ in # }; #}; + virtualHosts."cache.packetlost.dev" = { + locations."/".proxyPass = + "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + }; virtualHosts."img.ngp.computer" = { forceSSL = true; enableACME = true;