rofi: move setting package and terminal into hyprland/default.nix

Allows setting alternate packages / terminals depending on how it's
used

Change hyprland to reference rofi.finalPackage instead of package
This commit is contained in:
Evie Litherland-Smith 2024-01-31 07:21:01 +00:00
parent 5353091a1e
commit 81c1382843
2 changed files with 9 additions and 7 deletions

View file

@ -20,6 +20,11 @@
../nyxt/default.nix
../obs/default.nix
];
programs.rofi = with pkgs; {
package = rofi-wayland;
terminal = "${alacritty}/bin/alacritty";
pass.package = rofi-pass-wayland;
};
services = {
gpg-agent.pinentryFlavor = "gnome3";
avizo.enable = true;
@ -218,11 +223,11 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
"SUPER, F1, exec, ${swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"
"SUPER, Q, killactive,"
"SUPER SHIFT, Q, exec, ${rofi.package}/bin/rofi -replace -show power-menu"
"SUPER SHIFT, Q, exec, ${rofi.finalPackage}/bin/rofi -replace -show power-menu"
"SUPER, V, togglefloating"
"SUPER, M, fullscreen, 0"
"SUPER SHIFT, M, fullscreen, 1"
"SUPER, tab, exec, ${rofi.package}/bin/rofi -replace -show window"
"SUPER, tab, exec, ${rofi.finalPackage}/bin/rofi -replace -show window"
"SUPER, P, exec, pkill rofi || ${rofi.pass.package}/bin/rofi-pass"
"SUPER SHIFT, P, exec, pkill rofi || ${rofi.pass.package}/bin/rofi-pass --last-used"
"SUPER ALT, P, exec, pkill rofi || ${rofi.pass.package}/bin/rofi-pass --insert"
@ -230,7 +235,7 @@
"SUPER SHIFT, Z, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw"
# Common program shortcuts
"SUPER, Space, exec, ${rofi.package}/bin/rofi -replace -show combi"
"SUPER, Space, exec, ${rofi.finalPackage}/bin/rofi -replace -show combi"
"SUPER, Return, exec, ${alacritty.package}/bin/alacritty"
"SUPER SHIFT, Return, exec, ${emacs.finalPackage}/bin/emacsclient -c"
"SUPER, S, exec, ${alacritty.package}/bin/alacritty -e btm --group --battery"
@ -238,7 +243,7 @@
# Misc useful binds
'',Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"''
",XF86Calculator,exec,${rofi.package}/bin/rofi -replace -show calc"
",XF86Calculator,exec,${rofi.finalPackage}/bin/rofi -replace -show calc"
# Movement binds
"SUPER, H, movefocus, l"

View file

@ -6,12 +6,9 @@
stylix.targets.rofi.enable = true;
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
location = "center";
terminal = "${pkgs.alacritty}/bin/alacritty";
pass = {
enable = true;
package = pkgs.rofi-pass-wayland;
extraConfig = ''
USERNAME_field='login'
'';