diff options
| author | Devin Finlinson <devin.finlinson@pm.me> | 2025-07-18 15:11:35 -0600 |
|---|---|---|
| committer | Devin Finlinson <devin.finlinson@pm.me> | 2025-07-18 15:11:35 -0600 |
| commit | 7bae750ce6dda37b900271e398fef2fe9d2d0022 (patch) | |
| tree | e1d2ca859ec60cf994bd286a6f0af01096d3d417 /modules/nixos | |
| parent | 89e3c75643bfcf6c53685030120d2c74151a62e4 (diff) | |
testing binary cache and messing with vm networking
Diffstat (limited to 'modules/nixos')
| -rw-r--r-- | modules/nixos/binary-cache.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/nixos/binary-cache.nix b/modules/nixos/binary-cache.nix new file mode 100644 index 0000000..609a5dc --- /dev/null +++ b/modules/nixos/binary-cache.nix @@ -0,0 +1,18 @@ +{config, ... }: { + services.nix-serve = { + enable = true; + secretKeyFile = "/var/secrets/cache-private-key.pem"; + }; + + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts.cache = { + locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + }; + }; + + networking.firewall.allowedTCPPorts = [ + config.services.nginx.defaultHTTPListenPort + ]; +} |
