refactor(ops/machines/snix-cache): use new snix.store domain
Provide redirects when the old domain is accessed, which Nix seems to follow. We keep the same hostname, so historical node exporter graphs are still visible. Change-Id: Icecd7f5324ac25bbfd4c003ca9cc65681114f0b5 Reviewed-on: https://cl.snix.dev/c/snix/+/30484 Reviewed-by: edef <edef@edef.eu> Tested-by: besadii Autosubmit: Florian Klink <flokli@flokli.de>
This commit is contained in:
parent
7eb15f8123
commit
5dbe46eea7
4 changed files with 11 additions and 6 deletions
|
|
@ -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"
|
||||
];
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ in
|
|||
options = {
|
||||
machine.domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixos.tvix.store";
|
||||
default = "nixos.snix.store";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = ''
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue