forked from the-distro/infra
use dedicated store partition for hydra builds
This commit is contained in:
parent
d4f8cb6c87
commit
5bde7e2358
|
@ -57,6 +57,11 @@ in
|
||||||
fsType = "xfs";
|
fsType = "xfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt" = {
|
||||||
|
device = "/dev/disk/by-label/hydra";
|
||||||
|
fsType = "xfs";
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
|
@ -135,6 +140,13 @@ in
|
||||||
MaxStartups = "500:30:1000";
|
MaxStartups = "500:30:1000";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.hydra-gc = {
|
||||||
|
description = "Nix Garbage Collector";
|
||||||
|
script = "exec ${config.nix.package.out}/bin/nix-store --gc --store /mnt";
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
startAt = "hourly";
|
||||||
|
};
|
||||||
|
systemd.timers.hydra-gc.timerConfig.Persistent = true;
|
||||||
|
|
||||||
bagel.sysadmin.enable = true;
|
bagel.sysadmin.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ let
|
||||||
# XXX: to support Nix's dumb public host key syntax (base64'd), this outputs
|
# XXX: to support Nix's dumb public host key syntax (base64'd), this outputs
|
||||||
# a string with shell-style command interpolations: $(...).
|
# a string with shell-style command interpolations: $(...).
|
||||||
mkBaremetalBuilder = { parallelBuilds, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }:
|
mkBaremetalBuilder = { parallelBuilds, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }:
|
||||||
"ssh://${user}@${host} ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString parallelBuilds} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)";
|
"ssh://${user}@${host}?remote-store=/mnt ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString parallelBuilds} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)";
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - generalize to new architectures
|
# - generalize to new architectures
|
||||||
|
|
Loading…
Reference in a new issue