feat(ops/bugry): run nixery instance
Running Nixery on bugry is much more cost efficient (better traffic economics than on a cloud provider, and Nixery is mostly a traffic-heavy service), and frees up my Yandex Cloud credits for adding another builder. Change-Id: Id6c8c76b28a5ce13cc8b743ad6e72fffd19353fb Reviewed-on: https://cl.tvl.fyi/c/depot/+/12997 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
c49297d9ad
commit
5a33dd7ec3
2 changed files with 19 additions and 0 deletions
|
|
@ -6,8 +6,12 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
(mod "known-hosts.nix")
|
||||||
|
(mod "nixery.nix")
|
||||||
(mod "tvl-cache.nix")
|
(mod "tvl-cache.nix")
|
||||||
(mod "tvl-users.nix")
|
(mod "tvl-users.nix")
|
||||||
|
(mod "www/nixery.dev.nix")
|
||||||
|
|
||||||
(depot.third_party.agenix.src + "/modules/age.nix")
|
(depot.third_party.agenix.src + "/modules/age.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -167,5 +171,15 @@ in
|
||||||
tvl.cache.enable = true;
|
tvl.cache.enable = true;
|
||||||
tvl.cache.builderball = true;
|
tvl.cache.builderball = true;
|
||||||
|
|
||||||
|
services.depot.nixery.enable = true;
|
||||||
|
|
||||||
|
services.depot.automatic-gc = {
|
||||||
|
enable = true;
|
||||||
|
interval = "1 hour";
|
||||||
|
diskThreshold = 50; # GiB (10% of disk)
|
||||||
|
maxFreed = 150; # GiB
|
||||||
|
preserveGenerations = "14d";
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,11 @@
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
|
acmeFallbackHost = {
|
||||||
|
"nixery-01" = "bugry.tvl.fyi";
|
||||||
|
"bugry" = "nixery-01.tvl.fyi";
|
||||||
|
}."${config.networking.hostName}";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:${toString config.services.depot.nixery.port};
|
proxy_pass http://localhost:${toString config.services.depot.nixery.port};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue