firecat53/bitwarden-menu

Error in nixos

hmanhng opened this issue · 6 comments

run bwm return:

Traceback (most recent call last):
  File "/nix/store/rypx9lnj1cfk06pqq6pzrzlpk0m12wfg-bitwarden-menu/bin/.bwm-wrapped", line 6, in <module>
    from bwm.__main__ import main
ModuleNotFoundError: No module named 'bwm.__main__'

How did you install bitwarden-menu? NixOS, pipx?

If you installed using NixOS, are you using stable 23.11 or unstable?

How did you install bitwarden-menu? NixOS, pipx?

If you installed using NixOS, are you using stable 23.11 or unstable?

i using flake from url your git.

    bitwarden-menu = {
      url = "github:firecat53/bitwarden-menu";
      inputs.nixpkgs.follows = "nixpkgs";
    };

my config.ini

[dmenu]
dmenu_command = rofi -dmenu
# # Note that dmenu_command can contain arguments as well like:
# # `dmenu_command = rofi -dmenu -theme keepmenu -password`
# # `dmenu_command = rofi -dmenu -width 30 -password -i`
# # `dmenu_command = dmenu -i -l 25 -b -nb #222222 -nf #222222`
# pinentry = Pinentry command

[dmenu_passphrase]
# # Uses the -password flag for Rofi. For dmenu, sets -nb and -nf to the same color.
# obscure = True
# obscure_color = #222222

[vault]
server_1 = *** (my server)
email_1 = *** (my mail)
password_1 = *** (my pass)
# password_cmd_1 = <command to generate vault password>
# twofactor_1 = <0 for totp, 1 for email or 3 for yubikey>
# twofactor_1 =
# server_2 = <url>
# email_2 = <login email>
# etc....
session_timeout_min = 30

## Set 'gui_editor' for: emacs, gvim, leafpad
## Set 'editor' for terminal editors: vim, emacs -nw, nano
## Set 'terminal' if using a terminal editor
# editor = <path/to/terminal editor> 'vim' by default
editor = nvim
# terminal = <xterm, urxvt> <options if necessary>. 'xterm' by default
terminal = kitty
# gui_editor = <path/to/editor> <options>  e.g. gui_editor = gvim -f
gui_editor = emacs
# type_library = pynput (default), xdotool (for alternate keyboard layout support), ydotool or wtype (for Wayland)
type_library = ydotool
# hide_folders = Recycle Bin  <Note formatting for adding multiple folders>
#                Group 2
#                Group 3

## Set the default autotype sequence (https://keepass.info/help/base/autotype.html#autoseq)
autotype_default = {USERNAME}{TAB}{PASSWORD}{ENTER}

[password_chars]
## Set custom groups of characters for password generation. Any name is fine and
## these can be used to create new groups of presets in password_char_presets. If
## you reuse 'upper', 'lower', 'digits', or 'punctuation', those will
## replace the default values.
## Defaults:
# lower = abcdefghijklmnopqrstuvwxyz
# upper = ABCDEFGHIJKLMNOPQRSTUVWXYZ
# digits = 0123456789
## NOTE: remember that % needs to be escaped with another % sign
# punctuation = !"#$%%&'()*+,-./:;<=>?@[\]^_`{|}~
## EXAMPLES:
# punc min = !?#*@-+$%%
# upper = ABCDEFZ

[password_char_presets]
## Set character preset groups for password generation. For multiple sets use a space in between
## If you set any custom presets here, the default sets will not be displayed unless uncommented below:
## Valid values are: upper lower digits punctuation
## Also valid are any custom sets defined in [password_chars]
## Defaults:
# Letters+Digits+Punctuation = upper lower digits punctuation
# Letters+Digits = upper lower digits
# Letters = upper lower
# Digits = digits
## Custom Examples:
# Minimal Punc = upper lower digits "punc min"
# Router Site = upper digits

I'm not able to reproduce this. I was able to add my flake like this (edited for brevity...I can post full config if it's not clear):

flake.nix

inputs = {
  ...
  bwm.url = "github:firecat53/bitwarden-menu";
  bwm.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{
    self,
    disko,
    nixpkgs,
    nixpkgs-stable,
    sops-nix,
    home-manager,
    ...
  }: let
    inherit (self) outputs;
    system = "x86_64-linux";
  in {
    nixosConfigurations = {
      laptop = nixpkgs.lib.nixosSystem {
        specialArgs = {
          inherit inputs outputs;
        };
        modules = [
          ./hosts/laptop/configuration.nix
        ];
      };
    };
};

home-manager/home-manager.nix

{
  inputs,
  outputs,
  pkgs,
  ...
}:{
  # Home-manager configuration
  home-manager = {
    extraSpecialArgs = { 
      inherit inputs outputs pkgs ;
    };
  };
}

home-manager/common/packages.nix

{
  inputs,
  pkgs,
}:{
  home.packages = with pkgs; [
    ...
    inputs.bwm.packages.${pkgs.system}.default
  ];
}

It also worked adding the same package definition line to environment.systemPackages instead of home-manager.

Similar configuration to me. but it doesn't work

Check that you don't have any residual configuration left from old pip installs in ~/.local/share and ~/.local/bin, and that you're not installing the version from nixpkgs which I think has some issues and hasn't been updated yet.

Closing. If you any additional information please reopen. Thanks!