chore: tidy Justfile
This commit is contained in:
71
Justfile
71
Justfile
@@ -1,50 +1,51 @@
|
|||||||
root := `pwd`
|
set export
|
||||||
NH := "IMPURE_ROOT=" + root + " nh"
|
|
||||||
|
IMPURE_ROOT := `pwd`
|
||||||
|
|
||||||
all: fmt switch
|
all: fmt switch
|
||||||
|
|
||||||
switch:
|
@switch:
|
||||||
@echo "Rebuilding NixOS..."
|
echo "Rebuilding NixOS..."
|
||||||
@{{NH}} os switch . --impure
|
nh os switch . --impure
|
||||||
|
|
||||||
switch-offline:
|
@switch-offline:
|
||||||
@echo "Rebuilding NixOS without net..."
|
echo "Rebuilding NixOS without net..."
|
||||||
@{{NH}} os switch . --impure --no-net
|
nh os switch . --impure --no-net
|
||||||
|
|
||||||
alias offline := switch-offline
|
alias offline := switch-offline
|
||||||
|
|
||||||
boot:
|
@boot:
|
||||||
@echo "Rebuilding NixOS..."
|
echo "Rebuilding NixOS..."
|
||||||
@{{NH}} os boot . --impure
|
nh os boot . --impure
|
||||||
|
|
||||||
test:
|
@test:
|
||||||
@echo "Rebuilding NixOS..."
|
echo "Rebuilding NixOS..."
|
||||||
@{{NH}} os test . --impure
|
nh os test . --impure
|
||||||
|
|
||||||
vm:
|
@vm:
|
||||||
@echo "Building NixOS VM..."
|
echo "Building NixOS VM..."
|
||||||
@{{NH}} os build-vm . --impure
|
nh os build-vm . --impure
|
||||||
|
|
||||||
update:
|
@update:
|
||||||
@echo "Updating flakes..."
|
echo "Updating flakes..."
|
||||||
@nix flake update
|
nix flake update
|
||||||
|
|
||||||
repl:
|
@repl:
|
||||||
@nixos-rebuild repl --flake .
|
nixos-rebuild repl --flake .
|
||||||
|
|
||||||
cleandry:
|
@cleandry:
|
||||||
@echo "Listing all generations older than 15 days..."
|
echo "Listing all generations older than 15 days..."
|
||||||
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --dry-run --older-than 15d
|
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --dry-run --older-than 15d
|
||||||
@nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --dry-run --older-than 15d
|
nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --dry-run --older-than 15d
|
||||||
|
|
||||||
clean:
|
@clean:
|
||||||
@echo "Removing all generations older than 15 days..."
|
echo "Removing all generations older than 15 days..."
|
||||||
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 15d
|
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 15d
|
||||||
@nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --older-than 15d
|
nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --older-than 15d
|
||||||
|
|
||||||
gc:
|
@gc:
|
||||||
@nix store gc --debug
|
nix store gc --debug
|
||||||
|
|
||||||
fmt:
|
@fmt:
|
||||||
@echo "Formatting nix files..."
|
echo "Formatting files..."
|
||||||
@nix fmt
|
nix fmt
|
||||||
|
|||||||
Reference in New Issue
Block a user