From 64e1e6d5d0670c2169953a2da221f75bc22a7017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Thu, 25 Apr 2024 08:02:22 +0200 Subject: [PATCH] Pass env variables explicitly to systemd --- zsh/zprofile.j2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zsh/zprofile.j2 b/zsh/zprofile.j2 index 085bca6..10097d1 100644 --- a/zsh/zprofile.j2 +++ b/zsh/zprofile.j2 @@ -65,8 +65,14 @@ mkdir -p "${feature_dir}" touch "${feature_dir}"/gpg_agent {% endif %} -# Make all environment variables also usable in the systemd user instancee -systemctl --user import-environment +# Make important environment variables also usable in the systemd user instance +systemd_envs=( + DISPLAY + GNUPGHOME + PATH + ACPI_LID_NAME +) +systemctl --user import-environment "${systemd_envs[@]}" # exec startx breaks some logind fuckery, without exec it works if [[ -z $DISPLAY ]] ; then