gpg: Run agent conditionally

This commit is contained in:
2021-10-02 11:03:02 +02:00
parent e8f2888ead
commit 6e518966e0
2 changed files with 5 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionPathExists=%h/.var/run/features/gpg_agent
[Service]
Type=forking

View File

@@ -64,6 +64,10 @@ mkdir -p "${FEATURE_DIR}"
[[ $MACHINE_TYPE == "laptop" ]] && touch "${FEATURE_DIR}"/matchine_is_laptop
{% if user.gpg_agent %}
touch "${FEATURE_DIR}"/gpg_agent
{% endif %}
# Make all environment variables also usable in the systemd user instancee
systemctl --user import-environment