diff --git a/modules/programs/rofi.nix b/modules/programs/rofi.nix index 9c6badbfd..f4f7594e1 100644 --- a/modules/programs/rofi.nix +++ b/modules/programs/rofi.nix @@ -207,6 +207,15 @@ in { ''; }; + plugins = mkOption { + default = [ ]; + type = types.listOf types.package; + description = '' + List of rofi plugins to be installed. + ''; + example = literalExample "[ pkgs.rofi-calc ]"; + }; + width = mkOption { default = null; type = types.nullOr types.int; @@ -405,7 +414,14 @@ in { inherit value; }; - home.packages = [ cfg.package ]; + home.packages = let + rofiWithPlugins = cfg.package.override + (old: rec { plugins = (old.plugins or [ ]) ++ cfg.plugins; }); + rofiPackage = if builtins.hasAttr "override" cfg.package then + rofiWithPlugins + else + cfg.package; + in [ rofiPackage ]; home.file."${cfg.configPath}".text = toRasi { configuration = ({