build: add nom/nvd to justfile

This commit is contained in:
winston 2023-07-08 05:42:16 +02:00
parent 5cf7e5243f
commit 25631b00f0
Signed by: winston
GPG key ID: 3786770EDBC2B481
3 changed files with 12 additions and 4 deletions

View file

@ -11,8 +11,7 @@ export NIX_CONFIG := "
[private] [private]
[macos] [macos]
rebuild *args: rebuild *args:
#!/usr/bin/env bash #!/usr/bin/env -S bash -euo pipefail
set -euxo pipefail
dir="${TMPDIR:-/tmp}/nix-darwin" dir="${TMPDIR:-/tmp}/nix-darwin"
! [[ -x "$dir/sw/bin/darwin-rebuild" ]] && nix build .\#darwinConfigurations.`hostname`.system -o "$dir" ! [[ -x "$dir/sw/bin/darwin-rebuild" ]] && nix build .\#darwinConfigurations.`hostname`.system -o "$dir"
"$dir/sw/bin/darwin-rebuild" --flake . {{args}} "$dir/sw/bin/darwin-rebuild" --flake . {{args}}
@ -23,7 +22,9 @@ rebuild *args:
sudo nixos-rebuild --flake . {{args}} sudo nixos-rebuild --flake . {{args}}
build *args: build *args:
@just rebuild build {{args}} @sudo true
@just rebuild build {{args}} --log-format internal-json -v |& nom --json
@nvd diff /run/current-system result
home *args: home *args:
nix run ".#homeConfigurations.winston.activationPackage" {{args}} nix run ".#homeConfigurations.winston.activationPackage" {{args}}
@ -41,7 +42,11 @@ check *args:
@just rebuild test {{args}} @just rebuild test {{args}}
switch *args: switch *args:
@just rebuild switch {{args}} #!/usr/bin/env -S bash -euo pipefail
just build {{args}}
read -r -n 1 -p "Continue? [y/N]: " REPLY
[[ "$REPLY" =~ ^[Yy]$ ]] || exit 0
just rebuild switch {{args}}
fetch: fetch:
@nix shell nixpkgs\#onefetch nixpkgs\#scc -c sh -c "onefetch --true-color never --no-bots -d lines-of-code && scc --no-cocomo ." @nix shell nixpkgs\#onefetch nixpkgs\#scc -c sh -c "onefetch --true-color never --no-bots -d lines-of-code && scc --no-cocomo ."

View file

@ -95,6 +95,7 @@
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
name = "nixpkgs"; name = "nixpkgs";
inherit (self'.checks.pre-commit-check) shellHook; inherit (self'.checks.pre-commit-check) shellHook;
buildInputs = with pkgs; [nvd nix-output-monitor];
}; };
legacyPackages.homeConfigurations = let legacyPackages.homeConfigurations = let

View file

@ -23,6 +23,8 @@ in {
just just
mdcat mdcat
mosh mosh
nix-output-monitor
nvd
ranger ranger
ripgrep ripgrep
sops sops