summaryrefslogtreecommitdiff
path: root/justfile
blob: dc86168a9ae6612e697dfef68e2a22a7b5ced645 (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
default:
  @just --list

os hostname='kansai':
  #!/usr/bin/env sh

  if command -v doas &> /dev/null; then
    SUPERUSER_COMMAND=doas
  else
    SUPERUSER_COMMAND=sudo
  fi

  if ! command -v nh &> /dev/null; then
    $SUPERUSER_COMMAND nixos-rebuild switch --flake .#{{hostname}}
  else
    FLAKE="$(pwd)" nh home switch -- --impure
  fi

home user='ebisu':
  #!/usr/bin/env sh

  if ! command -v nh &> /dev/null; then
    home-manager switch --flake .#{{user}} --impure
  else
    FLAKE="$(pwd)" nh home switch -- --impure
  fi

news user='ebisu':
  home-manager news --flake .#{{user}}

bump message='Bump':
  git add .
  git commit -m "{{message}}"
  git push origin main