rbw!
This commit is contained in:
parent
aa522c199b
commit
c699350a18
5 changed files with 44 additions and 0 deletions
|
@ -78,6 +78,7 @@
|
|||
# tools
|
||||
tools.gpg.enable = true;
|
||||
tools.mpv.enable = true;
|
||||
tools.rbw.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -97,6 +97,9 @@ in {
|
|||
;;
|
||||
esac
|
||||
'';
|
||||
grabPasswordScript = pkgs.writeScript "grab-password" ''
|
||||
${lib.getExe pkgs.rbw} get $(${lib.getExe pkgs.gnome.zenity} --entry --text="Enter the name for your password entry to copy it to your clipboard" --title="Password") | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard
|
||||
'';
|
||||
in [
|
||||
"$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run"
|
||||
", print, exec, ${screenshotScript}"
|
||||
|
@ -121,6 +124,7 @@ in {
|
|||
"$mod, bracketright, workspace, e+1"
|
||||
|
||||
", XF86LaunchA, exec, ${screenshotScript}"
|
||||
", XF86LaunchB, exec, ${grabPasswordScript}"
|
||||
] ++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
|
|
19
modules/software/tools/rbw.nix
Normal file
19
modules/software/tools/rbw.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.tools.rbw;
|
||||
in {
|
||||
options.modules.software.tools.rbw = {
|
||||
enable = mkEnableOption "Enable rbw, a CLI Bitwarden frontend";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.programs.rbw = {
|
||||
enable = true;
|
||||
settings.email = "reidlab325@gmail.com";
|
||||
settings.lock_timeout = 60 * 60 * 24 * 7; # 1 week
|
||||
settings.pinentry = pkgs.pinentry-gnome3;
|
||||
};
|
||||
};
|
||||
}
|
20
overlays/rbw.nix
Normal file
20
overlays/rbw.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
final: prev: {
|
||||
rbw = prev.rbw.overrideAttrs (old: rec {
|
||||
version = "1.11.0";
|
||||
|
||||
src = prev.fetchzip {
|
||||
url = "https://git.tozt.net/rbw/snapshot/rbw-${version}.tar.gz";
|
||||
hash = "sha256-5KZ6mYYJEqsqREhQ/DoEgvPSwagObBCx8SFsiIiWCsI=";
|
||||
};
|
||||
|
||||
# we can't just override `cargoHash`, because of Nix
|
||||
# https://github.com/NixOS/nixpkgs/issues/107070
|
||||
cargoDeps = old.cargoDeps.overrideAttrs (
|
||||
prev.lib.const {
|
||||
name = "${old.pname}-vendor.tar.gz";
|
||||
inherit src;
|
||||
outputHash = "sha256-KlN31eNwywNVqwCl8s9r2RvEYl9/UMR2DR6Ov4ffwoc=";
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue