summaryrefslogtreecommitdiff
path: root/templates/nixos/justfile
blob: 5b524fbc90b0334299f3cb7db6f10acc684be949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
alias bo := boot
alias bu := build
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)

# Build your new configuration
build *args="": (rebuild "build" args)

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

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