-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.mise.toml
More file actions
98 lines (83 loc) · 2.35 KB
/
Copy path.mise.toml
File metadata and controls
98 lines (83 loc) · 2.35 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
experimental_monorepo_root = true
[env]
FIG_IDENTITY = "${FIG_IDENTITY:-namjul}"
SOPS_AGE_KEY_FILE = "{{env.HOME}}/.config/age/key.txt"
MISE_AGE_KEY_FILE = "{{env.HOME}}/.config/age/key.txt"
[monorepo]
config_roots = [
"aspects/*",
]
[settings]
sops.rops = false
experimental = true
env_shell_expand = true
[tools]
sops = "3.13.0"
age = "1.3.1"
deno = "2.8.0"
gomplate = "5.0.0"
fnox = "1.21.0"
[tasks."fig:test"]
description = "Run fig tests"
run = "deno test -A"
[tasks."fig:lint"]
description = "Lint fig modules"
run = "deno lint fig/"
[tasks."fig:check"]
description = "Type-check fig modules"
run = "deno check fig"
[tasks."fig:format"]
description = "Type-check fig modules"
run = "deno fmt fig"
[tasks."fig:verify"]
description = "Run fig check, lint, and tests"
depends = ["fig:check", "fig:lint", "fig:test"]
[tasks."fig"]
description = "Run all fig:* tasks"
depends = ["fig:*"]
[tasks."aspects:setup"]
description = "One-time machine bootstrap: verify age key exists at canonical location"
run = """
#!/usr/bin/env bash
AGE_KEY="${HOME}/.config/age/key.txt"
if [[ -f "$AGE_KEY" ]]; then
echo "age key found: $AGE_KEY"
else
echo "missing: $AGE_KEY — place your age identity file there"
exit 1
fi
"""
[tasks."arch:test-container"]
description = "Start ephemeral Arch test container with dotfiles bind-mounted"
run = """
sudo systemd-nspawn \
--ephemeral \
--bind=$HOME/.dotfiles:/root/.dotfiles \
--bind-ro=$HOME/.config/age/key.txt:/root/.config/age/key.txt \
--bind-ro=$HOME/fnox.local.toml:/root/fnox.local.toml \
--bind-ro=/dev/null:/run/fig-test-container \
-bD /var/lib/machines/arch
"""
[tasks."aspects:check"]
description = "Type-check fig modules"
run = "deno check aspects/**/*.ts"
[tasks."encrypt"]
description = "Encrypt a file with sops+age, writing <file>.encrypted"
usage = 'arg "<file>" help="Plaintext file to encrypt"'
run = """
#!/usr/bin/env bash
set -euo pipefail
PLAINTEXT="${usage_file?}"
CIPHERTEXT="${PLAINTEXT}.encrypted"
sops --encrypt --output "$CIPHERTEXT" "$PLAINTEXT"
"""
[tasks."decrypt"]
description = "Decrypt a <file>.encrypted sops file to its plaintext path"
usage = 'arg "<file>" help="Encrypted .encrypted file to decrypt"'
run = """
#!/usr/bin/env bash
set -euo pipefail
CIPHERTEXT="${usage_file?}"
PLAINTEXT="${CIPHERTEXT%.encrypted}"
sops --decrypt --filename-override "$PLAINTEXT" --output "$PLAINTEXT" "$CIPHERTEXT"
"""