From 7da29fee73ef82562b9688114d0b0b04f9c2cdd6 Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sat, 20 May 2023 15:06:09 +0100 Subject: [PATCH] Enable odyssey as binary cache --- hosts/desktop.nix | 10 ++++++++++ hosts/odyssey/default.nix | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/hosts/desktop.nix b/hosts/desktop.nix index 767cadc..731bfa5 100644 --- a/hosts/desktop.nix +++ b/hosts/desktop.nix @@ -44,6 +44,16 @@ with lib.my; neovim ]; + nix.settings = { + auto-optimise-store = true; + trusted-substituters = [ + "http://odyssey.mesh.vimium.net" + ]; + trusted-public-keys = [ + "odyssey.mesh.vimium.net:ZhQhjscPWjoN4rlZwoMELznEiBnZ9O26iyGA27ibilQ=" + ]; + }; + modules.desktop.gnome.enable = true; modules.networking.tailscale.enable = true; } diff --git a/hosts/odyssey/default.nix b/hosts/odyssey/default.nix index d77df62..35be1e5 100644 --- a/hosts/odyssey/default.nix +++ b/hosts/odyssey/default.nix @@ -25,6 +25,21 @@ with lib.my; system.stateVersion = "22.11"; + services.nix-serve = { + enable = true; + secretKeyFile = "/var/cache-priv-key.pem"; + }; + + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts = { + "odyssey.mesh.vimium.net" = { + locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + }; + }; + }; + modules = { desktop = { apps.qbittorrent.enable = true;