summaryrefslogtreecommitdiff
path: root/justfile
blob: 2b23ac1682e33434f663fc4e44ef146ab558e39e (plain) (blame)
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
default:
  @just --list

action target action:
  git add . && rui --allow-unfree {{target}} {{action}} -- --impure

build target:
  just action {{target}} build

switch target:
  just action {{target}} switch

news user='ebisu':
  rui home news --user {{user}} -- --impure

push message:
  git add . && git commit -m "{{message}}" && git push origin main

commit message:
  git add . && git commit -m "{{message}}"

restore:
  git restore --staged . && git restore .

deploy hostname='himeji' user='root':
  git add . && nixos-rebuild \
    --flake .#{{hostname}} \
    --target-host {{user}}@{{hostname}} \
    --use-remote-sudo \
    switch

provision ip hostname:
  doas nix run github:nix-community/nixos-anywhere \
    -- \
    --flake .#{{hostname}} root@{{ip}}