summaryrefslogtreecommitdiff
path: root/templates/nixos/justfile
blob: a6f8655c9088229e7446b038e9d5e47eb0e2da09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
alias b := boot
alias s := switch
alias sw := switch
alias t := test

rebuild := if os() == "macos" { "darwin-rebuild" } else { "nixos-rebuild" }

default:
	@just --choose

# Wrapper for `nixos-rebuild`. See `man nixos-rebuild`
rebuild subcmd *args="":
    {{ rebuild }} {{ subcmd }} --flake . {{ args }}

# Switch to your new configuration when you reboot
boot *args="": (rebuild "boot" args)

# Immediately switch to your new configuration
switch *args="": (rebuild "switch" args)

# Temporarily switch to your new configuration
test *args="": (rebuild "test" args)