2024-09-13 01:50:53 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2024-09-09 00:22:14 +00:00
|
|
|
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
|
|
|
|
|
|
|
cfg = config.custom.programs.bitwarden-menu;
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
|
|
|
options.custom.programs.bitwarden-menu.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
|
|
|
# https://github.com/firecat53/bitwarden-menu
|
|
|
|
#!! Options not available, files written directly
|
|
|
|
# https://github.com/firecat53/bitwarden-menu/blob/main/docs/configure.md
|
2024-11-17 23:27:14 +00:00
|
|
|
xdg.configFile."bwm/config.ini".text = ''
|
2024-09-09 00:22:14 +00:00
|
|
|
[dmenu]
|
|
|
|
dmenu_command = ${wofi} --dmenu
|
|
|
|
|
|
|
|
[dmenu_passphrase]
|
|
|
|
obscure = True
|
|
|
|
|
|
|
|
# FIXME: Login options taking effect
|
|
|
|
[vault]
|
|
|
|
server = https://vault.bitwarden.com
|
|
|
|
twofactor = 0
|
|
|
|
session_timeout_min = 720
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|