This commit is contained in:
commit
95a533c876
451 changed files with 18255 additions and 0 deletions
55
modules/home/rofi-rbw/default.nix
Normal file
55
modules/home/rofi-rbw/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.programs.rofi-rbw;
|
||||
|
||||
inherit (lib)
|
||||
generators
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkOption
|
||||
mkPackageOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.rofi-rbw = {
|
||||
enable = mkEnableOption "rofi-rbw";
|
||||
package = mkPackageOption pkgs "rofi-rbw" { };
|
||||
settings = mkOption {
|
||||
type = types.attrsOf (
|
||||
types.oneOf [
|
||||
types.str
|
||||
types.int
|
||||
types.bool
|
||||
]
|
||||
);
|
||||
default = { };
|
||||
example = {
|
||||
action = "copy";
|
||||
prompt = "Bitwarden";
|
||||
selector = "rofi";
|
||||
selector-args = "-i";
|
||||
};
|
||||
description = ''
|
||||
Configuration settings for rofi-rbw.
|
||||
See https://github.com/fdw/rofi-rbw/blob/main/docs/rofi-rbw.1.md
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."rofi-rbw.rc".text = generators.toKeyValue {
|
||||
mkKeyValue = key: value: "${key} = ${toString value}";
|
||||
} cfg.settings;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue