Use direct paths for hydra's nix store.
I was getting corrupted builds, so as a test I am using the direct path where the drive is mounted rather than going through bind mounts.
This commit is contained in:
parent
9b6b2874e8
commit
97014f6a2a
@ -56,7 +56,7 @@ let
|
||||
# "aarch64-linux"
|
||||
];
|
||||
|
||||
hostName = lib.mkForce "hydra?remote-store=local?root=/home/nixworker/persist/root";
|
||||
hostName = lib.mkForce "hydra?remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
joined_configs =
|
||||
@ -101,7 +101,7 @@ in
|
||||
# Using an ssh-based substituter slows down the build because querying the remote store for paths takes ages.
|
||||
#
|
||||
# nix.settings.substituters = lib.mkForce [
|
||||
# "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=/home/nixworker/persist/root"
|
||||
# "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=/.disk/root"
|
||||
# ];
|
||||
# nix.settings.substitute = lib.mkForce true;
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ in
|
||||
};
|
||||
|
||||
# Nix 2.30.0 (2025-07-07) changed the build directory from /tmp to /nix/var/nix/builds which broke a number of builds because my ZFS datasets were utf8only.
|
||||
fileSystems."/home/nixworker/persist/root/nix/var/nix/builds" = {
|
||||
fileSystems."/.disk/root/nix/var/nix/builds" = {
|
||||
device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
options = [
|
||||
@ -96,13 +96,13 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
systemd.timers."build-cache" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-* 03:00:00 America/New_York";
|
||||
Unit = "build-cache.service";
|
||||
};
|
||||
};
|
||||
# systemd.timers."build-cache" = {
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnCalendar = "*-*-* 03:00:00 America/New_York";
|
||||
# Unit = "build-cache.service";
|
||||
# };
|
||||
# };
|
||||
|
||||
systemd.services."build-cache" = {
|
||||
script = ''
|
||||
@ -110,7 +110,8 @@ in
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "''${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
NIX_REMOTE='local?root=/home/nixworker/persist/root' RUST_BACKTRACE=1 RUST_LOG=nix_builder=DEBUG ${nix_builder}/bin/nix-builder build --config ${./files/nix_builder.toml} --target odo --target odo_update --target odowork --target odowork_update --target quark --target quark_update --target hydra --target hydra_update --target controller0 --target controller0_update --target controller1 --target controller1_update --target controller2 --target controller2_update --target worker0 --target worker0_update --target worker1 --target worker1_update --target worker2 --target worker2_update --target family_disks --target family_disks_update --target nixbsd
|
||||
#NIX_REMOTE='local?root=/.disk/root' RUST_BACKTRACE=1 RUST_LOG=nix_builder=DEBUG ${nix_builder}/bin/nix-builder build --config ${./files/nix_builder.toml} --target odo --target odo_update --target odowork --target odowork_update --target quark --target quark_update --target hydra --target hydra_update --target controller0 --target controller0_update --target controller1 --target controller1_update --target controller2 --target controller2_update --target worker0 --target worker0_update --target worker1 --target worker1_update --target worker2 --target worker2_update --target family_disks --target family_disks_update --target nixbsd
|
||||
NIX_REMOTE='local?root=/.disk/root' RUST_BACKTRACE=1 RUST_LOG=nix_builder=DEBUG ${nix_builder}/bin/nix-builder build --config ${./files/nix_builder.toml} --target odo
|
||||
'';
|
||||
restartIfChanged = false;
|
||||
serviceConfig = {
|
||||
@ -124,13 +125,13 @@ in
|
||||
|
||||
# TODO: This should move into nix-builder so we can only run clean when builds are passing. Otherwise partial builds will lose progress.
|
||||
# TODO: In nix-builder maybe include setting to auto delete to make room during builds if we run out of space, just in case builds are failing for a long time and prevent cleanup from running.
|
||||
systemd.timers."clean-cache" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-01 02:00:00 America/New_York";
|
||||
Unit = "clean-cache.service";
|
||||
};
|
||||
};
|
||||
# systemd.timers."clean-cache" = {
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnCalendar = "*-*-01 02:00:00 America/New_York";
|
||||
# Unit = "clean-cache.service";
|
||||
# };
|
||||
# };
|
||||
|
||||
systemd.services."clean-cache" = {
|
||||
script = ''
|
||||
@ -138,7 +139,7 @@ in
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "''${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
NIX_REMOTE='local?root=/home/nixworker/persist/root' nix-collect-garbage -d
|
||||
NIX_REMOTE='local?root=/.disk/root' nix-collect-garbage -d
|
||||
'';
|
||||
path = with pkgs; [
|
||||
pkgs.nix
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user