From 8526353bc8b53dec2f2f38f23d701e3197691245 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 27 Jan 2024 04:55:16 +0100 Subject: [PATCH] pimp justfile --- flake.nix | 2 ++ justfile | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/flake.nix b/flake.nix index 0173b95..632a0d1 100644 --- a/flake.nix +++ b/flake.nix @@ -300,6 +300,7 @@ pkgs.sops pkgs.ssh-to-age pkgs.just + pkgs.gum ]; in { envrc-local = mkShell envrc-pkgs; @@ -313,6 +314,7 @@ pkgs.age pkgs.ssh-to-age pkgs.just + pkgs.gum ]; }); diff --git a/justfile b/justfile index af2ad3b..9e8873a 100644 --- a/justfile +++ b/justfile @@ -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: 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 .