Set user environment variables with home-manager
This commit is contained in:
parent
a3d1fa50b1
commit
b55144906f
|
@ -216,18 +216,19 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
|
||||||
# Cursor
|
# Cursor
|
||||||
seat seat0 xcursor_theme Adwaita
|
seat seat0 xcursor_theme Adwaita
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraSessionCommands = ''
|
home.sessionVariables = {
|
||||||
export CLUTTER_BACKEND=wayland
|
CLUTTER_BACKEND = "wayland";
|
||||||
export GDK_BACKEND=wayland
|
GDK_BACKEND = "wayland";
|
||||||
export GDK_DPI_SCALE=1
|
GDK_DPI_SCALE = 1;
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
export QT_QPA_PLATFORM=wayland-egl
|
QT_QPA_PLATFORM = "wayland-egl";
|
||||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
|
||||||
export SDL_VIDEODRIVER=wayland
|
SDL_VIDEODRIVER = "wayland";
|
||||||
export WLR_NO_HARDWARE_CURSORS=1
|
WLR_NO_HARDWARE_CURSORS = 1;
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
_JAVA_AWT_WM_NONREPARENTING = 1;
|
||||||
'';
|
_JAVA_OPTIONS = "-Dawt.useSystemAAFontSettings=on";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.swayidle = {
|
systemd.user.services.swayidle = {
|
||||||
|
@ -250,6 +251,7 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
|
||||||
programs.zsh.initExtra = ''
|
programs.zsh.initExtra = ''
|
||||||
if [[ -z $WAYLAND_DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
|
if [[ -z $WAYLAND_DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
|
||||||
export XDG_SESSION_TYPE="wayland" # otherwise set to tty
|
export XDG_SESSION_TYPE="wayland" # otherwise set to tty
|
||||||
|
unset __HM_SESS_VARS_SOURCED # otherwise sessionVariables are not updated
|
||||||
exec systemd-cat -t sway sway
|
exec systemd-cat -t sway sway
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue