31 lines
687 B
Nix
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"
|
|
];
|
|
};
|
|
}
|