nixos/home/common/optional/desktop/startx/default.nix

28 lines
613 B
Nix
Raw Normal View History

2024-06-13 17:31:49 +01:00
{
imports = [
../common
];
# TODO configure x11 to look in .config/x11
#home.file."${config.xdg.configHome}/x11/xinitrc" = {
home.file.".xinitrc" = {
recursive = true;
text = ''
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval $(dbus-launch --exit-with-session --sh-syntax)
fi
systemctl --user import-environment DISPLAY XAUTHORITY
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
export XSESSION_PID="$$"
exec dwm
'';
};
}