diff --git a/ops/machines/snix-cache/README.md b/ops/machines/snix-cache/README.md index ad82883b9..fdb03fdc3 100644 --- a/ops/machines/snix-cache/README.md +++ b/ops/machines/snix-cache/README.md @@ -1,4 +1,4 @@ -# nixos-tvix-cache +# nixos-snix-cache This is a fetch-through mirror of cache.nixos.org, hosted by NumTide. @@ -8,7 +8,7 @@ and 2x1TB NVMe disks. The goals of this machine: - Exercise snix-store and nar-bridge code - - Collect usage metrics (see [Grafana](https://nixos.tvix.store/grafana)) + - Collect usage metrics (see [Grafana](https://nixos.snix.store/grafana)) - Identify bottlenecks in the current implementations and fix them - Replace cache.nixos.org? @@ -16,7 +16,7 @@ You can configure this as a Nix substitutor on your systems like this: ```nix nix.settings.substituters = [ - "https://nixos.tvix.store" + "https://nixos.snix.store" ]; ``` diff --git a/ops/machines/snix-cache/default.nix b/ops/machines/snix-cache/default.nix index f5795c441..2c0bffae3 100644 --- a/ops/machines/snix-cache/default.nix +++ b/ops/machines/snix-cache/default.nix @@ -28,7 +28,7 @@ in options = { machine.domain = lib.mkOption { type = lib.types.str; - default = "nixos.tvix.store"; + default = "nixos.snix.store"; }; }; diff --git a/ops/machines/snix-cache/nar-bridge.nix b/ops/machines/snix-cache/nar-bridge.nix index d8e8ec383..3b2de4106 100644 --- a/ops/machines/snix-cache/nar-bridge.nix +++ b/ops/machines/snix-cache/nar-bridge.nix @@ -3,7 +3,7 @@ imports = [ ./nar-bridge-module.nix ]; # Microbenchmark - # hyperfine --warmup 1 'rm -rf /tmp/cache; nix copy --from https://nixos.tvix.store/ --to "file:///tmp/cache?compression=none" /nix/store/jlkypcf54nrh4n6r0l62ryx93z752hb2-firefox-132.0' + # hyperfine --warmup 1 'rm -rf /tmp/cache; nix copy --from https://nixos.snix.store/ --to "file:///tmp/cache?compression=none" /nix/store/jlkypcf54nrh4n6r0l62ryx93z752hb2-firefox-132.0' services.nginx = { package = pkgs.nginxStable; virtualHosts.${config.machine.domain} = { @@ -47,6 +47,11 @@ rewrite ^/nar/tvix-castore/(.*)$ /nar/snix-castore/$1 redirect; ''; }; + virtualHosts."nixos.tvix.store" = { + forceSSL = true; + enableACME = true; + locations."/".return = "301 https://nixos.snix.store$request_uri"; + }; # use more cores for compression appendConfig = '' diff --git a/ops/nixos.nix b/ops/nixos.nix index a43989780..9bddadadb 100644 --- a/ops/nixos.nix +++ b/ops/nixos.nix @@ -44,7 +44,7 @@ in rec { public01System = nixosFor depot.ops.machines.public01; build01System = nixosFor depot.ops.machines.build01; meta01System = nixosFor depot.ops.machines.meta01; - nixosSnixCache = nixosFor depot.ops.machines.snix-cache; + nixosSnixCacheSystem = nixosFor depot.ops.machines.snix-cache; meta.ci.targets = [ "archivistEC2System"