feat: 添加 Justfile 简化常用命令,安装 just
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
# List all commands
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# Rebuild current macOS host (auto-detect from hostname)
|
||||||
|
[macos]
|
||||||
|
darwin:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
attr=$(scutil --get LocalHostName | tr '[:upper:]' '[:lower:]' | sed 's/awesome-//')
|
||||||
|
sudo darwin-rebuild switch --flake .#"$attr"
|
||||||
|
|
||||||
|
# Rebuild WSL host
|
||||||
|
[linux]
|
||||||
|
nixos:
|
||||||
|
sudo nixos-rebuild switch --flake .#wsl
|
||||||
|
|
||||||
|
# Update all flake inputs
|
||||||
|
update:
|
||||||
|
nix flake update
|
||||||
|
|
||||||
|
# Edit encrypted secrets
|
||||||
|
secrets:
|
||||||
|
sops secrets/secrets.yaml
|
||||||
|
|
||||||
|
# Garbage-collect old generations
|
||||||
|
gc:
|
||||||
|
nix-collect-garbage -d
|
||||||
|
|
||||||
|
# Show flake outputs
|
||||||
|
show:
|
||||||
|
nix flake show
|
||||||
|
|
||||||
|
# Check flake for errors
|
||||||
|
check:
|
||||||
|
nix flake check --no-build
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
nix-output-monitor # nom
|
nix-output-monitor # nom
|
||||||
nvd # nix version diff
|
nvd # nix version diff
|
||||||
nh # nix helper
|
nh # nix helper
|
||||||
|
just
|
||||||
|
|
||||||
# Secrets management
|
# Secrets management
|
||||||
sops
|
sops
|
||||||
|
|||||||
Reference in New Issue
Block a user