about summary refs log tree commit diff
path: root/nixos/modules/services/editors
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-09-12 16:20:54 -0400
committerworldofpeace <worldofpeace@protonmail.ch>2019-09-18 11:13:43 -0400
commitcc125810cb4f305c5bcee937648ff3704f13c472 (patch)
treec730097608b49716911bd937e4ab215db81f55b9 /nixos/modules/services/editors
parent5669b062356b5d5b8019ecc706a70d75ec30da0f (diff)
downloadnixlib-cc125810cb4f305c5bcee937648ff3704f13c472.tar
nixlib-cc125810cb4f305c5bcee937648ff3704f13c472.tar.gz
nixlib-cc125810cb4f305c5bcee937648ff3704f13c472.tar.bz2
nixlib-cc125810cb4f305c5bcee937648ff3704f13c472.tar.lz
nixlib-cc125810cb4f305c5bcee937648ff3704f13c472.tar.xz
nixlib-cc125810cb4f305c5bcee937648ff3704f13c472.tar.zst
nixlib-cc125810cb4f305c5bcee937648ff3704f13c472.zip
nixos/environment: set GTK_DATA_PREFIX
Many desktop environment modules are already setting
this so it already makes sense to just do this globally.
Diffstat (limited to 'nixos/modules/services/editors')
-rw-r--r--nixos/modules/services/editors/emacs.nix8
1 files changed, 1 insertions, 7 deletions
diff --git a/nixos/modules/services/editors/emacs.nix b/nixos/modules/services/editors/emacs.nix
index ba7ec967919e..d791b387665f 100644
--- a/nixos/modules/services/editors/emacs.nix
+++ b/nixos/modules/services/editors/emacs.nix
@@ -95,13 +95,7 @@ in {
 
     environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
 
-    environment.variables = {
-      # This is required so that GTK applications launched from Emacs
-      # get properly themed:
-      GTK_DATA_PREFIX = "${config.system.path}";
-    } // (if cfg.defaultEditor then {
-        EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor";
-      } else {});
+    environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "${editorScript}/bin/emacseditor");
   };
 
   meta.doc = ./emacs.xml;