gpg: Run agent conditionally
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
ConditionPathExists=%h/.var/run/features/gpg_agent
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ mkdir -p "${FEATURE_DIR}"
|
|||||||
|
|
||||||
[[ $MACHINE_TYPE == "laptop" ]] && touch "${FEATURE_DIR}"/matchine_is_laptop
|
[[ $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
|
# Make all environment variables also usable in the systemd user instancee
|
||||||
systemctl --user import-environment
|
systemctl --user import-environment
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user