Files
nix/hosts/common/user/configs/gui/rofi/default.nix
2024-07-16 17:46:58 +03:00

31 lines
687 B
Nix

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