fix: simpler activation without pkgs interpolation

This commit is contained in:
mikl 2026-07-01 16:41:01 +03:00
parent 06433e4d9f
commit 3a0dbcca71

View file

@ -16,10 +16,10 @@
# Activation: ensure GPG key is available # Activation: ensure GPG key is available
# This is a best-effort setup that downloads from forgejo if needed # This is a best-effort setup that downloads from forgejo if needed
home.activation.passSetup = { home.activation.passSetup = {
data = '' data = builtins.toFile "pass-setup.sh" ''
# 1. Check if GPG has any keys # 1. Check if GPG has any keys
if ! ${pkgs.gnupg}/bin/gpg --list-secret-keys michaotic@iscg.dev >/dev/null 2>&1; then if ! gpg --list-secret-keys mikl@iscg.dev >/dev/null 2>&1; then
echo " GPG key for michaotic@iscg.dev not found." echo "WARNING: GPG key for mikl@iscg.dev not found."
echo "" echo ""
echo "Options:" echo "Options:"
echo " 1. Import existing key:" echo " 1. Import existing key:"
@ -38,8 +38,8 @@
# 2. Initialize pass git remote if needed # 2. Initialize pass git remote if needed
if [ ! -d "$HOME/.password-store/.git" ] && [ -d "$HOME/.password-store" ]; then if [ ! -d "$HOME/.password-store/.git" ] && [ -d "$HOME/.password-store" ]; then
cd "$HOME/.password-store" cd "$HOME/.password-store"
${pkgs.git}/bin/git init -q git init -q
${pkgs.git}/bin/git remote add origin "https://git.iscg.dev/mikl/password-store.git" 2>/dev/null || true git remote add origin "https://git.iscg.dev/mikl/password-store.git" 2>/dev/null || true
cd - >/dev/null cd - >/dev/null
fi fi
''; '';