summaryrefslogtreecommitdiff
path: root/justfile
blob: 100a6379ebb6473a210da0ad117ef471aff88b52 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
alias b := build
alias c := check
alias d := deploy
alias da := deploy-all
alias f := fmt
alias l := lint
alias p := pre-commit
alias sw := switch
alias t := test

default:
    @just --choose

[linux]
build:
    nixos-rebuild build --flake .

[macos]
build:
    darwin-rebuild --flake .

check:
    nix flake check

deploy HOST:
    nix run .#{{ HOST }}

deploy-all: (deploy "atlas") (deploy "p-body")

fmt:
    pre-commit run alejandra && pre-commit run stylua

lint:
    pre-commit run statix && pre-commit run deadnix

pre-commit:
    pre-commit run

[linux]
switch:
    sudo nixos-rebuild switch --flake .

[macos]
switch:
    darwin-rebuild switch --flake .

[linux]
test:
    sudo nixos-rebuild test --flake .

[macos]
test:
    darwin-rebuild test --flake .

update:
    nix flake update

update-nixpkgs:
    nix flake lock \
    	--update-input nixpkgs --update-input nixpkgsUnstable