configuration
flake
hosts
_iso
aluminium
astatine
backup-4
beryllium
carbon
clerie-backup
dn42-il-gw1
dn42-il-gw5
dn42-il-gw6
dn42-ildix-clerie
dn42-ildix-service
gatekeeper
hydra-1
cache.nix.clerie.de
build-machines.nix
configuration.nix
hardware-configuration.nix
hydra.nix
nix-cache-key.pub
nix-cache.nix
secrets.json
ssh.pub
hydra-2
krypton
mail-2
monitoring-3
nonat
osmium
palladium
porter
storage-2
tungsten
web-2
zinc
lib
modules
pkgs
profiles
users
.gitignore
README.md
flake.lock
flake.nix
68 lines
1.6 KiB
Nix
68 lines
1.6 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.harmonia = {
|
|
enable = true;
|
|
settings.bind = "[::1]:5005";
|
|
signKeyPaths = [
|
|
config.sops.secrets."sign-key-nix-cache.clerie.de".path
|
|
config.sops.secrets."sign-key-cache.nix.clerie.de".path
|
|
];
|
|
};
|
|
|
|
services.nginx.virtualHosts = {
|
|
"nix-cache.clerie.de" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."= /" = {
|
|
index = "/index.txt";
|
|
};
|
|
locations."= /index.txt" = {
|
|
root = ./cache.nix.clerie.de;
|
|
};
|
|
locations."/" = {
|
|
proxyPass = "http://[::1]:5005";
|
|
extraConfig = ''
|
|
proxy_redirect http:// https://;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
'';
|
|
};
|
|
};
|
|
"cache.nix.clerie.de" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."= /" = {
|
|
index = "/index.txt";
|
|
};
|
|
locations."= /index.txt" = {
|
|
root = ./cache.nix.clerie.de;
|
|
};
|
|
locations."= /nix/store/" = {
|
|
extraConfig = ''
|
|
return 404;
|
|
'';
|
|
};
|
|
locations."/nix/store/" = {
|
|
root = "/";
|
|
extraConfig = ''
|
|
autoindex on;
|
|
autoindex_exact_size off;
|
|
'';
|
|
};
|
|
locations."/" = {
|
|
proxyPass = "http://[::1]:5005";
|
|
extraConfig = ''
|
|
proxy_redirect http:// https://;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|