add basic time reporter

This commit is contained in:
Daylin Morgan 2024-01-24 17:37:15 -06:00
parent 88026e1ff7
commit ec6bc91504
Signed by: daylin
GPG Key ID: C1E52E7DD81DF79F
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,5 @@
{
input,
inputs,
pkgs,
...
}: {
@ -19,6 +19,7 @@
environment.systemPackages = with pkgs; [
nix-output-monitor
alejandra
inputs.self.packages.${pkgs.system}.styx
];
nix.settings = {

8
styx
View File

@ -69,11 +69,19 @@ dry() {
nix build "$FLAKE_PATH#nixosConfigurations.$(hostname).config.system.build.toplevel" --dry-run
}
cache() {
start=$(date +%s)
cachix watch-exec daylin \
-- \
nix build "$FLAKE_PATH#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel" \
--print-build-logs
end=$(date +%s)
runtime=$(date -d@$((end-start)) +'%M minutes, %S seconds')
echo "Built host: ${HOSTNAME} in ${runtime} seconds" >> "$GITHUB_OUTPUT_SUMMARY"
}