nix-serve: setup binarycache

This commit is contained in:
Christoph Hollizeck 2025-04-30 19:01:55 +02:00
parent 1bc74fb9a3
commit a615bb8897
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
3 changed files with 24 additions and 10 deletions

View file

@ -76,15 +76,14 @@ in
};
};
# "${domainName}" = {
# forceSSL = cfg.enableAcme;
# useACMEHost = mkIf cfg.enableAcme domainName;
"nixcache.${domainName}" = {
forceSSL = cfg.enableAcme;
useACMEHost = mkIf cfg.enableAcme domainName;
# locations."/" = {
# root = /var/www/website;
# index = "index.html";
# };
# };
locations."/" = {
proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
};
};
"_" = {
forceSSL = cfg.enableAcme;
@ -146,6 +145,10 @@ in
nix = {
distributedBuilds = true;
extraOptions = ''
builders-use-substitutes = true
'';
buildMachines = [
{
hostName = "localhost";
@ -175,6 +178,11 @@ in
];
};
services.nix-serve = {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
services.hydra = {
enable = true;
hydraURL = "http://localhost:${toString hydraPort}";