pimp justfile

This commit is contained in:
Peder Bergebakken Sundt 2024-01-27 04:55:16 +01:00
parent eebf364bfb
commit 8526353bc8
2 changed files with 27 additions and 0 deletions

View File

@ -300,6 +300,7 @@
pkgs.sops pkgs.sops
pkgs.ssh-to-age pkgs.ssh-to-age
pkgs.just pkgs.just
pkgs.gum
]; ];
in { in {
envrc-local = mkShell envrc-pkgs; envrc-local = mkShell envrc-pkgs;
@ -313,6 +314,7 @@
pkgs.age pkgs.age
pkgs.ssh-to-age pkgs.ssh-to-age
pkgs.just pkgs.just
pkgs.gum
]; ];
}); });

View File

@ -1,2 +1,27 @@
@_default:
#just --choose # TODO: achieve something better with `gum`
#just --list --list-prefix ' just '
just "$(gum choose $(just --summary --unsorted))"
report: report:
nix eval .#nixosReports --json | yq . --yaml-output nix eval .#nixosReports --json | yq . --yaml-output
update:
git reset flake.lock
git restore flake.lock
git pull --rebase --autostash
nix flake update --commit-lock-file
@mkdir -p .direnv/
@echo "$(date +%Y-%m-%d)" > .direnv/pull-date
build:
nixos-rebuild build --flake .
test:
sudo nixos-rebuild test --flake .
switch:
sudo nixos-rebuild switch --flake .
boot:
sudo nixos-rebuild boot --flake .