From fd68579042fdc2c52fb483764a77eeb84b9a33af Mon Sep 17 00:00:00 2001 From: sid Date: Mon, 18 May 2026 13:36:06 +0200 Subject: [PATCH 1/3] pass2bw: fix PATH --- pkgs/pass2bw/default.nix | 13 ++++++++++--- pkgs/pass2bw/pass2bw.sh | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/pass2bw/default.nix b/pkgs/pass2bw/default.nix index 349d8d1..ce42f1f 100644 --- a/pkgs/pass2bw/default.nix +++ b/pkgs/pass2bw/default.nix @@ -2,6 +2,8 @@ stdenv, lib, makeWrapper, + pass, + pass2csv, python3, ... }: @@ -20,13 +22,18 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin - sed -e "s|python ./convert_csvs.py|python $out/bin/convert_csvs.py|" \ - ${src}/${pname}.sh > $out/bin/${pname} + cp ${src}/pass2bw.sh $out/bin/${pname} chmod +x $out/bin/${pname} cp ${src}/convert_csvs.py $out/bin/ wrapProgram $out/bin/${pname} \ - --prefix PATH : ${lib.makeBinPath [ python3 ]} + --prefix PATH : ${ + lib.makeBinPath [ + pass + pass2csv + python3 + ] + } ''; } diff --git a/pkgs/pass2bw/pass2bw.sh b/pkgs/pass2bw/pass2bw.sh index 95cb544..887a881 100644 --- a/pkgs/pass2bw/pass2bw.sh +++ b/pkgs/pass2bw/pass2bw.sh @@ -4,5 +4,5 @@ if [ "$#" -ne 2 ]; then fi pass2csv "$1" /tmp/pass.csv -python ./convert_csvs.py /tmp/pass.csv "$2" +python3 "$(dirname "$0")/convert_csvs.py" /tmp/pass.csv "$2" rm /tmp/pass.csv -- 2.51.2 From 49c93c82e08bfadad2be42968c83ffc287b2e7f8 Mon Sep 17 00:00:00 2001 From: sid Date: Mon, 18 May 2026 16:08:01 +0200 Subject: [PATCH 2/3] fix pass2bw --- pkgs/pass2bw/convert_csvs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/pass2bw/convert_csvs.py b/pkgs/pass2bw/convert_csvs.py index 4babb74..c67b842 100644 --- a/pkgs/pass2bw/convert_csvs.py +++ b/pkgs/pass2bw/convert_csvs.py @@ -42,6 +42,14 @@ def process_csv(input_file, output_file): for col, default_val in default_values.items(): if col not in new_row: new_row[col] = default_val + + folder = new_row.get('folder', '') + name = new_row.get('name', '') + if folder.startswith('www') and name: + if not name.startswith('http://') and not name.startswith('https://'): + new_row['login_uri'] = f'https://{name}' + else: + new_row['login_uri'] = name if new_row['notes']: new_row['notes'] = new_row['notes'].replace('\n', ' ').replace('\r', ' ') @@ -49,7 +57,6 @@ def process_csv(input_file, output_file): notes = new_row['notes'] if notes: - # Look for pattern: "login: USERNAME" match = re.search(r'login:\s*(\S+)', notes, re.IGNORECASE) if match: username = match.group(1) -- 2.51.2 From fff1263c85d86481253af6974c27a5d083f17d22 Mon Sep 17 00:00:00 2001 From: sid Date: Mon, 18 May 2026 16:33:15 +0200 Subject: [PATCH 3/3] add bitwarden app to hyprland --- .../applications/bitwarden/default.nix | 46 +++++++++++++++++++ .../home/hyprland/applications/default.nix | 1 + 2 files changed, 47 insertions(+) create mode 100644 modules/home/hyprland/applications/bitwarden/default.nix diff --git a/modules/home/hyprland/applications/bitwarden/default.nix b/modules/home/hyprland/applications/bitwarden/default.nix new file mode 100644 index 0000000..bae501f --- /dev/null +++ b/modules/home/hyprland/applications/bitwarden/default.nix @@ -0,0 +1,46 @@ +{ + inputs, + config, + lib, + pkgs, + ... +}: + +let + cfg = config.wayland.windowManager.hyprland; + app = cfg.applications.password-manager.default; + + inherit (lib) mkDefault mkIf; +in +{ + imports = [ ../../../rofi-rbw ]; + + config = mkIf (cfg.enable && app == "rofi-rbw") { + programs.rbw = { + enable = true; + settings = { + # email = "you@example.tld"; # You have to set this in your config + pinentry = mkDefault pkgs.pinentry-gnome3; + lock_timeout = mkDefault 3600; + }; + }; + + programs.rofi-rbw = { + enable = true; + package = mkDefault pkgs.rofi-rbw-wayland; + settings = { + selector = mkDefault "bemenu"; + selector-args = mkDefault "-i -l 20"; + action = mkDefault "copy"; + typing-key-delay = mkDefault 0; + }; + }; + + programs.librewolf = mkIf config.programs.librewolf.enable { + profiles.default.extensions.packages = + with inputs.nur.legacyPackages."${pkgs.stdenv.hostPlatform.system}".repos.rycee.firefox-addons; [ + bitwarden + ]; + }; + }; +} diff --git a/modules/home/hyprland/applications/default.nix b/modules/home/hyprland/applications/default.nix index 8b434be..661d47e 100644 --- a/modules/home/hyprland/applications/default.nix +++ b/modules/home/hyprland/applications/default.nix @@ -56,6 +56,7 @@ let in { imports = [ + ./bitwarden ./bemenu ./dmenu-bluetooth ./dunst-toggle -- 2.51.2