diff --git a/modules/home/hyprland/applications/bitwarden/default.nix b/modules/home/hyprland/applications/bitwarden/default.nix deleted file mode 100644 index bae501f..0000000 --- a/modules/home/hyprland/applications/bitwarden/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - 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 661d47e..8b434be 100644 --- a/modules/home/hyprland/applications/default.nix +++ b/modules/home/hyprland/applications/default.nix @@ -56,7 +56,6 @@ let in { imports = [ - ./bitwarden ./bemenu ./dmenu-bluetooth ./dunst-toggle diff --git a/pkgs/pass2bw/convert_csvs.py b/pkgs/pass2bw/convert_csvs.py index c67b842..4babb74 100644 --- a/pkgs/pass2bw/convert_csvs.py +++ b/pkgs/pass2bw/convert_csvs.py @@ -42,14 +42,6 @@ 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', ' ') @@ -57,6 +49,7 @@ 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) diff --git a/pkgs/pass2bw/default.nix b/pkgs/pass2bw/default.nix index ce42f1f..349d8d1 100644 --- a/pkgs/pass2bw/default.nix +++ b/pkgs/pass2bw/default.nix @@ -2,8 +2,6 @@ stdenv, lib, makeWrapper, - pass, - pass2csv, python3, ... }: @@ -22,18 +20,13 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin - cp ${src}/pass2bw.sh $out/bin/${pname} + sed -e "s|python ./convert_csvs.py|python $out/bin/convert_csvs.py|" \ + ${src}/${pname}.sh > $out/bin/${pname} chmod +x $out/bin/${pname} cp ${src}/convert_csvs.py $out/bin/ wrapProgram $out/bin/${pname} \ - --prefix PATH : ${ - lib.makeBinPath [ - pass - pass2csv - python3 - ] - } + --prefix PATH : ${lib.makeBinPath [ python3 ]} ''; } diff --git a/pkgs/pass2bw/pass2bw.sh b/pkgs/pass2bw/pass2bw.sh index 887a881..95cb544 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 -python3 "$(dirname "$0")/convert_csvs.py" /tmp/pass.csv "$2" +python ./convert_csvs.py /tmp/pass.csv "$2" rm /tmp/pass.csv