2025-04-17 12:06:57 +02:00
|
|
|
# List all receipes
|
2025-02-13 21:52:01 +01:00
|
|
|
default:
|
|
|
|
@just --list
|
|
|
|
|
2025-04-17 12:06:57 +02:00
|
|
|
# Format all files in repo
|
2025-02-13 21:52:01 +01:00
|
|
|
fmt:
|
|
|
|
treefmt --on-unmatched info
|
|
|
|
|
2025-04-17 12:06:57 +02:00
|
|
|
# Build a specific host but don't activate it. Host must use same system as target system
|
2025-04-15 23:39:10 +02:00
|
|
|
build HOST:
|
|
|
|
git add .
|
|
|
|
just fmt
|
|
|
|
nh os build . -H {{HOST}}
|
|
|
|
|
2025-04-17 12:06:57 +02:00
|
|
|
# Switch to new config, but don't add to bootloader
|
2025-02-13 21:52:01 +01:00
|
|
|
test *FLAGS:
|
2025-04-13 13:22:57 +02:00
|
|
|
git add .
|
2025-04-14 23:30:50 +02:00
|
|
|
just fmt
|
2025-02-13 21:52:01 +01:00
|
|
|
nh os test . {{FLAGS}}
|
|
|
|
|
2025-04-17 12:06:57 +02:00
|
|
|
# Switch to new config and add to bootloader
|
2025-02-13 21:52:01 +01:00
|
|
|
switch *FLAGS:
|
2025-04-13 13:22:57 +02:00
|
|
|
git add .
|
2025-04-14 23:30:50 +02:00
|
|
|
just fmt
|
2025-02-13 21:52:01 +01:00
|
|
|
nh os switch . {{FLAGS}}
|
|
|
|
|
2025-04-17 12:06:57 +02:00
|
|
|
# Switch to new config and add to bootloader without formatting or adding to git
|
2025-02-13 21:52:01 +01:00
|
|
|
switch-now *FLAGS:
|
|
|
|
nh os switch . {{FLAGS}}
|
|
|
|
|
2025-04-06 12:55:05 +02:00
|
|
|
update-all:
|
2025-02-13 21:52:01 +01:00
|
|
|
nix-channel --update
|
|
|
|
nix flake update
|
|
|
|
|
|
|
|
just switch
|
2025-03-01 15:11:42 +01:00
|
|
|
|
2025-04-06 12:55:05 +02:00
|
|
|
update PKG:
|
|
|
|
nix flake update {{PKG}}
|
|
|
|
just switch
|
|
|
|
|
2025-03-02 08:19:45 +01:00
|
|
|
# Encrypt all files in the repo using git-crypt
|
2025-03-01 15:11:42 +01:00
|
|
|
lock:
|
|
|
|
git-crypt lock
|
|
|
|
|
2025-03-02 08:19:45 +01:00
|
|
|
# Decrypt all files in the repo using git-crypt and the user's GPG key
|
2025-03-01 15:11:42 +01:00
|
|
|
unlock:
|
|
|
|
git-crypt unlock ~/.config/git/crypt-key
|
2025-04-15 18:22:06 +02:00
|
|
|
|
|
|
|
# Connect to tailnet or sign-in if not registered
|
|
|
|
start-tailscale:
|
|
|
|
tailscale up --login-server https://vpn.martials.no
|
2025-04-17 00:31:19 +02:00
|
|
|
|
|
|
|
# Generate a new age key from an existing ssh key (without passphrase)
|
|
|
|
@generate-age-from-ssh:
|
|
|
|
nix run nixpkgs#ssh-to-age -- -private-key -i ~/.ssh/id_ed25519 > ~/.config/sops/age/keys.txt
|
|
|
|
|
|
|
|
# Get a public age key from an existing age private key
|
|
|
|
@get-public-age-key:
|
|
|
|
nix shell nixpkgs#age -c age-keygen -y ~/.config/sops/age/keys.txt
|
|
|
|
|
|
|
|
# Edit the SOPS secrets file
|
|
|
|
@edit-secrets:
|
|
|
|
nix run nixpkgs#sops -- shared/secrets/secrets.yaml
|
|
|
|
|
|
|
|
# Hash a string using the mkpasswd command
|
|
|
|
hash PASS:
|
|
|
|
echo "{{PASS}}" | mkpasswd -s
|