Skip to content

Instantly share code, notes, and snippets.

@lovesegfault
Created April 8, 2019 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lovesegfault/2e6ecd57ed6799f3c32f7d6c3257b051 to your computer and use it in GitHub Desktop.
Save lovesegfault/2e6ecd57ed6799f3c32f7d6c3257b051 to your computer and use it in GitHub Desktop.
{ config, pkgs, lib, ... }:
{
config.home.sessionVariables = rec {
EDITOR = "nvim";
VISUAL = EDITOR;
} // lib.optionals (config.isDesktop) {
SSH_ASKPASS = "${pkgs.gnome3.seahorse}/libexec/seahorse/ssh-askpass";
DESKTOP_SESSION = "gnome";
ECORE_EVAS_ENGINE = "wayland_egl";
ELM_ENGINE = "wayland_egl";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_WAYLAND_FORCE_DPI = "physical";
SDL_VIDEODRIVER = "wayland";
XDG_CURRENT_DESKTOP = "GNOME";
_JAVA_AWT_WM_NONREPARENTING = "1";
};
}
@rycee
Copy link

rycee commented Apr 8, 2019

{ config, pkgs, lib, ... }:

{
  config.home.sessionVariables = lib.mkMerge [
    rec {
      EDITOR = "nvim";
      VISUAL = EDITOR;
    }

    (lib.mkIf config.isDesktop {
      SSH_ASKPASS = "${pkgs.gnome3.seahorse}/libexec/seahorse/ssh-askpass";
      DESKTOP_SESSION = "gnome";
      ECORE_EVAS_ENGINE = "wayland_egl";
      ELM_ENGINE = "wayland_egl";
      QT_QPA_PLATFORM = "wayland";
      QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
      QT_WAYLAND_FORCE_DPI = "physical";
      SDL_VIDEODRIVER = "wayland";
      XDG_CURRENT_DESKTOP = "GNOME";
      _JAVA_AWT_WM_NONREPARENTING = "1";
    })
  ];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment