Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: icarus debug cachix/bk sc fix #1021

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions hosts/x86_64-linux/icarus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
config,
pkgs,
hostName,
self,
...
}: {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHaa82NwBC+ty4Wyeuf5kdava7huSYF6k0NYF2ahwayW";
Expand Down Expand Up @@ -104,7 +103,7 @@
services.buildkite-agents.nix-build = {
tokenPath = config.age.secrets.buildkite-token.path;
privateSshKeyPath = config.age.secrets.buildkite-ssh-key.path;
runtimePackages = [pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix pkgs.cachix];
runtimePackages = [pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix pkgs.cachix pkgs.procps];
extraConfig = ''
spawn=4
'';
Expand All @@ -122,17 +121,10 @@
pre-command = ''
#!/usr/bin/env bash
cachix use "$CACHE_NAME"
cachix watch-store "$CACHE_NAME" &
CACHIX_PID="$!"
echo cachix pid is "$CACHIX_PID"
echo "$CACHIX_PID" > /tmp/"$BUILDKITE_AGENT_ID".cachix.pid
ps aux | grep cachix
'';
post-command = ''
command = ''
#!/usr/bin/env bash
CACHIX_PID="$(cat /tmp/"$BUILDKITE_AGENT_ID".cachix.pid)"
echo "killing cachix with pid $CACHIX_PID"
kill "$CACHIX_PID" || true
cachix --verbose watch-exec "$CACHE_NAME" -- bash -c "$BUILDKITE_COMMAND"
'';
};
};
Expand Down