feat: env module with wayland vars, correct editor fallbacks

This commit is contained in:
2026-03-04 17:19:52 +01:00
parent 758ad4c0bd
commit f0db46ffda
2 changed files with 31 additions and 14 deletions
+31
View File
@@ -0,0 +1,31 @@
{ ... }:
{
home.sessionPath = [
"$HOME/.local/bin"
"$HOME/.config/emacs/bin"
];
systemd.user.sessionVariables = {
# Terminal
TERMINAL = "kitty";
# Wayland
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
QT_QPA_PLATFORM = "wayland";
GDK_BACKEND = "wayland";
SDL_VIDEODRIVER = "wayland";
_JAVA_AWT_WM_NONREPARENTING = "1";
# Editor
EDITOR = "emacsclient -c -a nvim";
VISUAL = "emacsclient -c -a nvim";
SUDO_EDITOR = "nvim";
# Pager
PAGER = "bat --color auto";
MANPAGER = "bat -plman";
};
}
-14
View File
@@ -33,18 +33,4 @@ in
}; };
}; };
# PATH additions — HM prepends these to PATH in the correct order
home.sessionPath = [
"$HOME/.config/emacs/bin"
];
# Environment variables
home.sessionVariables = {
EDITOR = "emacsclient -c";
VISUAL = "emacsclient -c";
SUDO_EDITOR = "emacsclient -c";
PAGER = "bat --color auto";
MANPAGER = "bat -plman";
_JAVA_AWT_WM_NONREPARENTING = "1";
};
} }