Skip to content

Commit c34e729

Browse files
committed
feat(dot): use git-crypt to encrypt my secrets.env
1 parent 26a3e88 commit c34e729

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

ansible/roles/packages/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
# dev
8181
- fnm-bin
8282
- git
83+
- git-crypt
8384
- git-delta
8485
- github-cli
8586
- httpie

config/fish/conf.d/pve.fish

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@ function pct_enter
1414
pve pct enter $id
1515
end
1616

17-
function pve-ssh-copy-id -d "Copy the SSH public key to a Proxmox VM/LXC" -a name
18-
set cid $argv[1]
19-
echo "Copying SSH public key to $cid"
20-
21-
cat ~/.ssh/id_ed25519.pub |
22-
ssh $node bash -c "pct exec $cid -- bash -c \"mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys\""
23-
end
24-
25-
2617
function win
18+
test -z "$PVE_API_KEY"; and echo "PVE_API_KEY not set" and return 1
2719
cv4pve-pepper --api-token $PVE_API_KEY --host 10.0.0.10 --viewer (which remote-viewer) --vmid 106 --start-or-resume
2820
end

config/fish/conf.d/secrets.fish

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
set -l secrets_file ~/.config/fish/secrets.env
2+
3+
# Source secrets if available (git-crypt handles encryption/decryption automatically)
4+
if test -f $secrets_file
5+
while read -l line
6+
# Skip empty lines and comments
7+
if test -n "$line"; and not string match -qr '^\s*#' -- $line
8+
# Export the variable
9+
set -l parts (string split -m 1 '=' -- $line)
10+
if test (count $parts) -eq 2
11+
set -gx $parts[1] $parts[2]
12+
end
13+
end
14+
end <$secrets_file
15+
end

config/fish/secrets.env

-951 Bytes
Binary file not shown.

pacman.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ adobe-source-han-sans-cn-fonts
77
adobe-source-han-sans-jp-fonts
88
adobe-source-han-sans-kr-fonts
99
adw-gtk-theme
10+
age
1011
aider-chat-venv
1112
alacritty
1213
alsa-firmware
@@ -110,6 +111,7 @@ gammastep
110111
gedit
111112
ghostty
112113
git
114+
git-crypt
113115
git-delta
114116
github-cli
115117
glances
@@ -348,6 +350,7 @@ snapper
348350
snapshot
349351
socat
350352
sof-firmware
353+
sops
351354
speech-dispatcher
352355
spotify-launcher
353356
spotify-player

0 commit comments

Comments
 (0)