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, pkgs,
... ...
}: { }: {
@ -19,6 +19,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nix-output-monitor nix-output-monitor
alejandra alejandra
inputs.self.packages.${pkgs.system}.styx
]; ];
nix.settings = { nix.settings = {

8
styx
View file

@ -69,11 +69,19 @@ dry() {
nix build "$FLAKE_PATH#nixosConfigurations.$(hostname).config.system.build.toplevel" --dry-run nix build "$FLAKE_PATH#nixosConfigurations.$(hostname).config.system.build.toplevel" --dry-run
} }
cache() { cache() {
start=$(date +%s)
cachix watch-exec daylin \ cachix watch-exec daylin \
-- \ -- \
nix build "$FLAKE_PATH#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel" \ nix build "$FLAKE_PATH#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel" \
--print-build-logs --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"
} }