From d761532a9bd9d5d6724a758bd61b4c63776ea43b Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Fri, 23 Aug 2024 12:49:58 -0400 Subject: [PATCH] defaultApps: use builtins.baseNameOf where appropriate (#98) * defaultApps: use basenames of executables for session vars * defaultApps: set xfce4 helpers.rc --- homeManagerModules/apps/thunar/default.nix | 6 ------ homeManagerModules/defaultApps.nix | 12 +++++++++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/homeManagerModules/apps/thunar/default.nix b/homeManagerModules/apps/thunar/default.nix index f916acba..1f83f4e4 100644 --- a/homeManagerModules/apps/thunar/default.nix +++ b/homeManagerModules/apps/thunar/default.nix @@ -14,11 +14,5 @@ xfce.tumbler xfce.xfconf ]; - - xdg.configFile."xfce4/helpers.rc".text = '' - FileManager=thunar - TerminalEmulator=kitty - WebBrowser=firefox - ''; }; } diff --git a/homeManagerModules/defaultApps.nix b/homeManagerModules/defaultApps.nix index 06c8fc2b..b22c9a57 100644 --- a/homeManagerModules/defaultApps.nix +++ b/homeManagerModules/defaultApps.nix @@ -29,13 +29,19 @@ in { ]; sessionVariables = { - BROWSER = "${lib.getExe cfg.webBrowser}"; - EDITOR = "${lib.getExe cfg.terminalEditor}"; - TERMINAL = "${lib.getExe cfg.terminal}"; + BROWSER = "${builtins.baseNameOf (lib.getExe cfg.webBrowser)}"; + EDITOR = "${builtins.baseNameOf (lib.getExe cfg.terminalEditor)}"; + TERMINAL = "${builtins.baseNameOf (lib.getExe cfg.terminal)}"; }; }; xdg = { + configFile."xfce4/helpers.rc".text = '' + FileManager=${builtins.baseNameOf (lib.getExe cfg.fileManager)} + TerminalEmulator=${builtins.baseNameOf (lib.getExe cfg.terminal)} + WebBrowser=${builtins.baseNameOf (lib.getExe cfg.webBrowser)} + ''; + mimeApps = { enable = true;