chore: tidy Justfile
This commit is contained in:
71
Justfile
71
Justfile
@@ -1,50 +1,51 @@
|
||||
root := `pwd`
|
||||
NH := "IMPURE_ROOT=" + root + " nh"
|
||||
set export
|
||||
|
||||
IMPURE_ROOT := `pwd`
|
||||
|
||||
all: fmt switch
|
||||
|
||||
switch:
|
||||
@echo "Rebuilding NixOS..."
|
||||
@{{NH}} os switch . --impure
|
||||
@switch:
|
||||
echo "Rebuilding NixOS..."
|
||||
nh os switch . --impure
|
||||
|
||||
switch-offline:
|
||||
@echo "Rebuilding NixOS without net..."
|
||||
@{{NH}} os switch . --impure --no-net
|
||||
@switch-offline:
|
||||
echo "Rebuilding NixOS without net..."
|
||||
nh os switch . --impure --no-net
|
||||
|
||||
alias offline := switch-offline
|
||||
|
||||
boot:
|
||||
@echo "Rebuilding NixOS..."
|
||||
@{{NH}} os boot . --impure
|
||||
@boot:
|
||||
echo "Rebuilding NixOS..."
|
||||
nh os boot . --impure
|
||||
|
||||
test:
|
||||
@echo "Rebuilding NixOS..."
|
||||
@{{NH}} os test . --impure
|
||||
@test:
|
||||
echo "Rebuilding NixOS..."
|
||||
nh os test . --impure
|
||||
|
||||
vm:
|
||||
@echo "Building NixOS VM..."
|
||||
@{{NH}} os build-vm . --impure
|
||||
@vm:
|
||||
echo "Building NixOS VM..."
|
||||
nh os build-vm . --impure
|
||||
|
||||
update:
|
||||
@echo "Updating flakes..."
|
||||
@nix flake update
|
||||
@update:
|
||||
echo "Updating flakes..."
|
||||
nix flake update
|
||||
|
||||
repl:
|
||||
@nixos-rebuild repl --flake .
|
||||
@repl:
|
||||
nixos-rebuild repl --flake .
|
||||
|
||||
cleandry:
|
||||
@echo "Listing all generations older than 15 days..."
|
||||
@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
|
||||
@cleandry:
|
||||
echo "Listing all generations older than 15 days..."
|
||||
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
|
||||
|
||||
clean:
|
||||
@echo "Removing all generations older than 15 days..."
|
||||
@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
|
||||
@clean:
|
||||
echo "Removing all generations older than 15 days..."
|
||||
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
|
||||
|
||||
gc:
|
||||
@nix store gc --debug
|
||||
@gc:
|
||||
nix store gc --debug
|
||||
|
||||
fmt:
|
||||
@echo "Formatting nix files..."
|
||||
@nix fmt
|
||||
@fmt:
|
||||
echo "Formatting files..."
|
||||
nix fmt
|
||||
|
||||
Reference in New Issue
Block a user