Compare commits

..

3 Commits

Author SHA1 Message Date
b26aa2aa23
Use hut-substituter module in owl{1,2} and raccoon 2025-02-26 16:03:34 +01:00
6fac30abc4
Add module to use hut as a binary substituter 2025-02-26 16:03:26 +01:00
5d549df767
Fix nginx /cache regex
`nix-serve` does not handle duplicates in the path:
```
hut$ curl http://127.0.0.1:5000/nix-cache-info
StoreDir: /nix/store
WantMassQuery: 1
Priority: 30
hut$ curl http://127.0.0.1:5000//nix-cache-info
File not found.
```

This meant that the cache was not accessible via:
`curl https://jungle.bsc.es/cache/nix-cache-info` but
`curl https://jungle.bsc.es/cachenix-cache-info` worked.
2025-02-26 15:31:05 +01:00
5 changed files with 13 additions and 1 deletions

View File

@ -38,7 +38,7 @@ in
proxy_redirect http:// $scheme://;
}
location /cache {
rewrite ^/cache(.*) /$1 break;
rewrite ^/cache/(.*) /$1 break;
proxy_pass http://127.0.0.1:5000;
proxy_redirect http:// $scheme://;
}

View File

@ -0,0 +1,9 @@
{ config, ... }:
# Don't add hut as a cache to itself
assert config.networking.hostName != "hut";
{
nix.settings = {
substituters = [ "https://jungle.bsc.es/cache" ];
trusted-public-keys = [ "jungle.bsc.es:pEc7MlAT0HEwLQYPtpkPLwRsGf80ZI26aj29zMw/HH0=" ];
};
}

View File

@ -8,6 +8,7 @@
../module/slurm-client.nix
../module/slurm-firewall.nix
../module/debuginfod.nix
../module/hut-substituter.nix
];
# Select the this using the ID to avoid mismatches

View File

@ -8,6 +8,7 @@
../module/slurm-client.nix
../module/slurm-firewall.nix
../module/debuginfod.nix
../module/hut-substituter.nix
];
# Select the this using the ID to avoid mismatches

View File

@ -3,6 +3,7 @@
{
imports = [
../common/base.nix
../module/hut-substituter.nix
];
# Don't install Grub on the disk yet