VEGAS/nix: move to cluster/services/attic and adapt for migration
This commit is contained in:
parent
116d257fc4
commit
2aeb766afb
4 changed files with 27 additions and 9 deletions
|
@ -8,18 +8,34 @@ let
|
|||
port = builtins.head (builtins.tail addrSplit);
|
||||
in
|
||||
{
|
||||
services.nginx.upstreams.nar-serve.extraConfig = ''
|
||||
random;
|
||||
server ${config.links.nar-serve-self.tuple} fail_timeout=0;
|
||||
server ${config.links.nar-serve-nixos-org.tuple} fail_timeout=0;
|
||||
'';
|
||||
services.nginx.upstreams = {
|
||||
nar-serve.extraConfig = ''
|
||||
random;
|
||||
server ${config.links.nar-serve-self.tuple} fail_timeout=0;
|
||||
server ${config.links.nar-serve-nixos-org.tuple} fail_timeout=0;
|
||||
'';
|
||||
nix-store.servers = {
|
||||
"${config.links.atticServer.tuple}" = {
|
||||
fail_timeout = 0;
|
||||
};
|
||||
"${host}:${port}" = {
|
||||
fail_timeout = 0;
|
||||
backup = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx.appendHttpConfig = ''
|
||||
proxy_cache_path /var/cache/nginx/nixstore levels=1:2 keys_zone=nixstore:10m max_size=10g inactive=24h use_temp_path=off;
|
||||
'';
|
||||
services.nginx.virtualHosts."cache.${tools.meta.domain}" = vhosts.basic // {
|
||||
locations = {
|
||||
"= /".return = "302 /404";
|
||||
"/".proxyPass = "http://${host}:${port}/nix-store$request_uri";
|
||||
"/" = {
|
||||
proxyPass = "http://nix-store/nix-store$request_uri";
|
||||
extraConfig = ''
|
||||
proxy_next_upstream error http_500 http_404;
|
||||
'';
|
||||
};
|
||||
"/nix/store" = {
|
||||
proxyPass = "http://nar-serve";
|
||||
extraConfig = ''
|
|
@ -4,7 +4,11 @@
|
|||
server = [ "VEGAS" ];
|
||||
};
|
||||
nixos = {
|
||||
server = ./server.nix;
|
||||
server = [
|
||||
./server.nix
|
||||
./binary-cache.nix
|
||||
./nar-serve.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
./services/jokes
|
||||
./services/mail
|
||||
./services/minecraft
|
||||
./services/nix/binary-cache.nix
|
||||
./services/nix/nar-serve.nix
|
||||
./services/reflex
|
||||
./services/sso
|
||||
./services/vault
|
||||
|
|
Loading…
Reference in a new issue