From 145668c3dd67c5271eddcb62d1e7843487d768a7 Mon Sep 17 00:00:00 2001 From: Cullum Smith Date: Tue, 15 Oct 2024 23:35:53 -0400 Subject: huge amount of fixes --- files/etc/profile.d/kde.sh.common | 6 ++++++ files/etc/profile.d/local-homedir.sh.common | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 files/etc/profile.d/kde.sh.common create mode 100644 files/etc/profile.d/local-homedir.sh.common (limited to 'files/etc/profile.d') diff --git a/files/etc/profile.d/kde.sh.common b/files/etc/profile.d/kde.sh.common new file mode 100644 index 0000000..010d5c1 --- /dev/null +++ b/files/etc/profile.d/kde.sh.common @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$XDG_CURRENT_DESKTOP" = KDE ]; then + export SSH_ASKPASS_REQUIRE=prefer + export SSH_ASKPASS=/usr/local/bin/ksshaskpass +fi diff --git a/files/etc/profile.d/local-homedir.sh.common b/files/etc/profile.d/local-homedir.sh.common new file mode 100644 index 0000000..d5abb90 --- /dev/null +++ b/files/etc/profile.d/local-homedir.sh.common @@ -0,0 +1,25 @@ +#!/bin/sh + +# This file contains various environment variables and hacks to accomodate +# applications that don't play well with NFS-mounted home directories. + +if [ "$(id -u)" -lt 1000 ]; then + return 0 +fi + +LOCAL_HOME="/usr/local/home/${USER}" + +export PYTHONUSERBASE="${LOCAL_HOME}/.local" +export npm_config_cache="${LOCAL_HOME}/.npm" +export CARGO_HOME="${LOCAL_HOME}/.cargo" +export GOPATH="${LOCAL_HOME}/go" + +# firefox +mkdir -p "${LOCAL_HOME}/.mozilla" +ln -sfn "${LOCAL_HOME}/.mozilla" "${HOME}/.mozilla" + +# kwallet +# The kwallet PAM module hard-codes ~/.local/share/kwalletd, but kwallet itself +# honors XDG_DATA_HOME! So we symlink from the local disk back into NFS. Gross! +mkdir -p "${LOCAL_HOME}/.local/share/kwalletd" +ln -sfn "${HOME}/.local/share/kwalletd/kwallet.salt" "${LOCAL_HOME}/.local/share/kwalletd/kdewallet.salt" -- cgit v1.2.3