Files
nix/hosts/common/user/configs/gui/rofi/default.nix
2024-08-08 22:03:15 +03:00

29 lines
603 B
Nix

{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{
config,
lib,
pkgs,
...
}:
let
hmConfig = config.home-manager.users.${user};
in
{
environment.persistence."/cache"."${home}/.cache/rofi" = { };
home-manager.users.${user} = {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
font = builtins.head hmConfig.theme.font.monospace.names;
};
wayland.windowManager.hyprland.settings.bind = [
"$mod, r, exec, ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${home}/.cache/rofi -show drun"
];
};
}