default:
    @just --list

fmt:
    treefmt --on-unmatched info

test *FLAGS:
    git add .
    just fmt
    nh os test . {{FLAGS}}

switch *FLAGS:
    git add .
    just fmt
    nh os switch . {{FLAGS}}

switch-now *FLAGS:
    nh os switch . {{FLAGS}}

update:
    nix-channel --update
    nix flake update

    just switch

# Encrypt all files in the repo using git-crypt
lock:
    git-crypt lock

# Decrypt all files in the repo using git-crypt and the user's GPG key
unlock:
    git-crypt unlock ~/.config/git/crypt-key
