fix default.nix in .gitignore (oops)

This commit is contained in:
2025-12-23 23:21:16 +02:00
parent 205268b683
commit 24665ffe5b
7 changed files with 91 additions and 2 deletions
+49
View File
@@ -0,0 +1,49 @@
set unstable
flake_path := "/etc/nixos"
privesc := if which("sudo") != "" {
"sudo"
} else if which("doas") != "" {
"doas"
} else if which("run0") != "" {
"run0 --background="
} else if which("pkexec") != "" {
"pkexec"
} else {
error("No privilege escalation tool found")
}
default:
@just --list
# Rebuild and switch
[group('nix')]
sw:
nh os switch {{flake_path}}
# Update and switch
[group('nix')]
up:
nh os switch --update {{flake_path}}
# Update specific input: `just upp nixpkgs`
[group('nix')]
upp input:
nix flake update {{input}}
# Test
[group('nix')]
test:
nh os test {{flake_path}}
# Collect garbage
[group('nix')]
gc:
nix-collect-garbage --delete-old
{{privesc}} nix-collect-garbage -d
{{privesc}} /run/current-system/bin/switch-to-configuration boot
# Run `nh clean all`
[group('nix')]
ca:
nh clean all