2024-09-08 19:22:14 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-12 20:50:53 -05:00
|
|
|
with lib; let
|
2024-09-08 19:22:14 -05:00
|
|
|
cfg = config.custom.programs.rbw;
|
2024-09-12 20:50:53 -05:00
|
|
|
in {
|
2025-02-09 18:43:55 -06:00
|
|
|
options.custom.programs.rbw = {
|
|
|
|
enable = mkOption {default = false;};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
# https://github.com/fdw/rofi-rbw
|
|
|
|
environment.systemPackages = [pkgs.rofi-rbw];
|
|
|
|
|
|
|
|
home-manager.sharedModules = mkIf cfg.enable [
|
|
|
|
{
|
|
|
|
# https://github.com/doy/rbw
|
|
|
|
#!! Register with API secrets before using
|
|
|
|
#?? rbw register
|
|
|
|
#?? rbw login
|
|
|
|
programs.rbw = {
|
|
|
|
enable = true;
|
2024-09-08 19:22:14 -05:00
|
|
|
|
2025-02-09 18:43:55 -06:00
|
|
|
# https://github.com/doy/rbw?tab=readme-ov-file#configuration
|
|
|
|
settings = {
|
|
|
|
base_url = "https://vault.${config.custom.domain}";
|
|
|
|
email = "${config.custom.username}@${config.custom.domain}";
|
|
|
|
pinentry = pkgs.pinentry-gnome3;
|
|
|
|
};
|
|
|
|
};
|
2024-09-08 19:22:14 -05:00
|
|
|
|
2025-02-09 18:43:55 -06:00
|
|
|
# TODO: Enable input emulation when merged (uinput.enable?)
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/303745
|
|
|
|
# https://github.com/fdw/rofi-rbw?tab=readme-ov-file#configuration
|
|
|
|
xdg.configFile = {
|
|
|
|
"rofi-rbw.rc".text = ''
|
|
|
|
action=copy
|
2025-02-10 15:10:57 -06:00
|
|
|
no-help=true
|
2025-02-09 18:43:55 -06:00
|
|
|
selector=${config.custom.menu}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2024-09-08 19:22:14 -05:00
|
|
|
};
|
|
|
|
}
|