From c53f1470ee04890f461796ba0d14cce393f2b5c3 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 19 Mar 2023 12:49:41 -0400 Subject: [PATCH] allow rofi-systemd to use kitty terminal --- modules/common/applications/kitty.nix | 16 ++++++++++++++-- modules/nixos/graphical/rofi.nix | 8 ++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/modules/common/applications/kitty.nix b/modules/common/applications/kitty.nix index 8de7236..95e67df 100644 --- a/modules/common/applications/kitty.nix +++ b/modules/common/applications/kitty.nix @@ -10,9 +10,21 @@ }; config = lib.mkIf (config.gui.enable && config.kitty.enable) { + + # Set the Rofi-Systemd terminal for viewing logs + environment.sessionVariables.ROFI_SYSTEMD_TERM = + lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty"; + home-manager.users.${config.user} = { - # xsession.windowManager.i3.config.terminal = "kitty"; - # programs.rofi.terminal = "${pkgs.kitty}/bin/kitty"; + + # Set the i3 terminal + xsession.windowManager.i3.config.terminal = + lib.mkIf pkgs.stdenv.isLinux "kitty"; + + # Set the Rofi terminal for running programs + programs.rofi.terminal = + lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty"; + programs.kitty = { enable = true; environment = { }; diff --git a/modules/nixos/graphical/rofi.nix b/modules/nixos/graphical/rofi.nix index 7a580c6..a8e09aa 100644 --- a/modules/nixos/graphical/rofi.nix +++ b/modules/nixos/graphical/rofi.nix @@ -144,9 +144,13 @@ }; - launcherCommand = "${pkgs.rofi}/bin/rofi -show run -modi run"; + launcherCommand = "${ + config.home-manager.users.${config.user}.programs.rofi.finalPackage + }/bin/rofi -show run -modi run"; systemdSearch = "${pkgs.rofi-systemd}/bin/rofi-systemd"; - altTabCommand = "${pkgs.rofi}/bin/rofi -show window -modi window"; + altTabCommand = "${ + config.home-manager.users.${config.user}.programs.rofi.finalPackage + }/bin/rofi -show window -modi window"; };