019b6d260e
This relates to nixery#167. Using our GC module is much more reliable than what we were doing previously. Change-Id: I1956457812a3a847a7c8a1f4e7e91e50fad08ac0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11453 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de>
40 lines
948 B
Nix
40 lines
948 B
Nix
# nixery.dev backing host in ru-central1-b
|
|
{ depot, lib, pkgs, ... }: # readTree options
|
|
{ config, ... }: # passed by module system
|
|
|
|
let
|
|
mod = name: depot.path.origSrc + ("/ops/modules/" + name);
|
|
in
|
|
{
|
|
imports = [
|
|
(mod "known-hosts.nix")
|
|
(mod "nixery.nix")
|
|
(mod "tvl-users.nix")
|
|
(mod "www/nixery.dev.nix")
|
|
(mod "yandex-cloud.nix")
|
|
|
|
(depot.third_party.agenix.src + "/modules/age.nix")
|
|
];
|
|
|
|
networking = {
|
|
hostName = "nixery-01";
|
|
domain = "tvl.fyi";
|
|
firewall.allowedTCPPorts = [ 22 80 443 ];
|
|
};
|
|
|
|
security.sudo.extraRules = lib.singleton {
|
|
groups = [ "wheel" ];
|
|
commands = [{ command = "ALL"; options = [ "NOPASSWD" ]; }];
|
|
};
|
|
|
|
services.depot.nixery.enable = true;
|
|
|
|
# Automatically collect garbage from the Nix store.
|
|
services.depot.automatic-gc = {
|
|
enable = true;
|
|
interval = "1 hour";
|
|
diskThreshold = 25; # GiB
|
|
maxFreed = 150; # GiB
|
|
preserveGenerations = "30d";
|
|
};
|
|
}
|