Finish nix-cache
Some checks failed
Run nix flake check / flake-check (push) Failing after 4m3s

This commit is contained in:
2025-01-24 15:48:03 +01:00
parent e70e892ab2
commit 006d0b9213
9 changed files with 85 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ in
{
systemd.services."build-flakes" = {
serviceConfig = {
Type = "oneshot";
Type = "exec";
ExecStart = "${build-flake-script}/bin/build-flake-script";
};
};
@@ -36,7 +36,7 @@ in
enable = true;
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "Sun 06:00:00";
OnCalendar = "*-*-* *:30:00";
};
};
}

View File

@@ -2,5 +2,7 @@
{
imports = [
./build-flakes.nix
./nix-serve.nix
./proxy.nix
];
}

View File

@@ -0,0 +1,12 @@
{ pkgs, config, ... }:
{
sops.secrets."cache-secret" = {
sopsFile = ../../secrets/nix-cache01/cache-secret;
format = "binary";
};
services.nix-serve = {
enable = true;
package = pkgs.nix-serve-ng;
secretKeyFile = config.sops.secrets.cache-secret.path;
};
}

View File

@@ -0,0 +1,18 @@
{ pkgs, ... }:
{
services.caddy = {
enable = true;
configFile = pkgs.writeText "Caddyfile" ''
{
acme_ca https://ca.home.2rjus.net/acme/acme/directory
}
nix-cache.home.2rjus.net {
log {
output file /var/log/caddy/nzbget.log
}
reverse_proxy http://localhost:5000
}
'';
};
}

View File

@@ -1,7 +1,7 @@
$ORIGIN home.2rjus.net.
$TTL 1800
@ IN SOA ns1.home.2rjus.net. admin.test.2rjus.net. (
2046 ; serial number
2047 ; serial number
3600 ; refresh
900 ; retry
1209600 ; expire
@@ -57,6 +57,7 @@ ca IN A 10.69.13.12
monitoring01 IN A 10.69.13.13
jelly01 IN A 10.69.13.14
nix-cache01 IN A 10.69.13.15
nix-cache IN CNAME nix-cache01
; http-proxy cnames
nzbget IN CNAME http-proxy