diff --git a/machines/default.nix b/machines/default.nix index 9f6d7156..22e6e7a6 100644 --- a/machines/default.nix +++ b/machines/default.nix @@ -52,7 +52,7 @@ XDG_BIN_HOME = "$HOME/.local/bin"; }; - # Conform more programs to XDG conventions. The rest are handle by their + # Conform more programs to XDG conventions. The rest are handled by their # respective modules. my.env = { __GL_SHADER_DISK_CACHE_PATH = "$XDG_CACHE_HOME/nv"; diff --git a/modules/desktop/bspwm.nix b/modules/desktop/bspwm.nix index 3e98c16f..03187b83 100644 --- a/modules/desktop/bspwm.nix +++ b/modules/desktop/bspwm.nix @@ -114,7 +114,22 @@ home.xdg.configFile = { "sxhkd".source = ; # link recursively so other modules can link files in their folders - "bspwm" = { source = ; recursive = true; }; + "bspwm" = { + source = ; + recursive = true; + }; }; + + env.XAUTHORITY = "/tmp/Xauthority"; + init = '' + [ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY" + ''; }; + + system.activationScripts.clearHome = '' + pushd /home/${config.my.username} + rm -rf .compose-cache .nv .pki .dbus .fehbg + [ -s .xsession-errors ] || rm -f .xsession-errors* + popd + ''; }