summaryrefslogtreecommitdiff
path: root/justfile
blob: 4431a27c424fa5b2acc50ce11c9c7ad9f5d3d6ef (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 os switch
  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='':
  git add .
  git commit -m "{{ if message == "" { "Bump" } else { "Bump: " + message } }}"
  git push origin main