From 42ba26404728a66b51fc7f8fd665fdc6a666f4e9 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 25 Nov 2024 08:03:59 +0000 Subject: [PATCH] Configure rofi and add plugins --- nix/modules/nixos/desktop/default.nix | 1 + nix/modules/nixos/desktop/i3.nix | 2 +- nix/modules/nixos/desktop/rofi.nix | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 nix/modules/nixos/desktop/rofi.nix diff --git a/nix/modules/nixos/desktop/default.nix b/nix/modules/nixos/desktop/default.nix index d1d7f40..126da1f 100644 --- a/nix/modules/nixos/desktop/default.nix +++ b/nix/modules/nixos/desktop/default.nix @@ -7,6 +7,7 @@ ./i3.nix ./immich.nix ./jellyfin.nix + ./rofi.nix ./screenkey.nix ./xbanish.nix ]; diff --git a/nix/modules/nixos/desktop/i3.nix b/nix/modules/nixos/desktop/i3.nix index 5fa0ea6..481fd23 100644 --- a/nix/modules/nixos/desktop/i3.nix +++ b/nix/modules/nixos/desktop/i3.nix @@ -64,7 +64,7 @@ in modifier = modifier; keybindings = inputs.nixpkgs.lib.mkOptionDefault { - "${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun"; + "${modifier}+d" = "exec rofi -show drun"; "${modifier}+Shift+b" = "exec ${pkgs.firefox}/bin/firefox"; "${modifier}+Shift+f" = "exec ${pkgs.xfce.thunar}/bin/thunar"; diff --git a/nix/modules/nixos/desktop/rofi.nix b/nix/modules/nixos/desktop/rofi.nix new file mode 100644 index 0000000..b8befe5 --- /dev/null +++ b/nix/modules/nixos/desktop/rofi.nix @@ -0,0 +1,24 @@ +{ pkgs, username, ... }: + +{ + environment.systemPackages = with pkgs; [ + rofi + rofi-power-menu + ]; + + home-manager.users.${username}.programs.rofi = { + enable = true; + cycle = true; + + extraConfig = { + modi = "run,drun,emoji,calc"; + }; + + plugins = with pkgs; [ + rofi-bluetooth + rofi-calc + rofi-emoji + rofi-pulse-select + ]; + }; +}