1password under sway / wayland only

Hi there,

Are any others using 1Password under a Wayland-only env, such as sway?

I am running into the following:

  • I can’t copy our of a 1password entry
  • I can’t use the ssh-agent from my vault

Just curious if others are using it, and have any additional config they suggest under Nixos.

Thank you.

1 Like

Did anyone get back to you?

I’d guess the former is due to the Xwayland clipboard not being shared with the wayland clipboard (so 1password as an electron browser can only ever copy to other Xwayland windows, which is probably few at this point).

The solutions to that problem are:

  1. Get a clipboard manager that syncs the clipboards
    • That will also persist the clipboard entries from applications that closed
  2. Use the CLI tool or an alternative GUI using it that does work on wayland
  3. Get hired by 1password and solve: nixpkgs/pkgs/applications/misc/1password-gui/linux.nix at c716603a63aca44f39bef1986c13402167450e0a · NixOS/nixpkgs · GitHub

The latter, no idea without more logs, might be a misconfiguration somewhere.

1 Like

I will have a look at your suggestions. The funny thing is that it works under Gnome/Wayland, just not Sway.

Yep, gnome will have a clipboard manager built-in.

Some additional info.

  • If I edit the item and copy it with ctrl-c, then go to my target and paste it with my middle mouse button, it works. But I HAVE to edit, and use ctrl-c.
  • I can use the browser extension for copying without issue.
  • this comment was on the 1password forum:

" I was investigating why NixOS doesn’t automatically enable native Wayland support for 1Password the way it does with most Electron apps when you set the environment variable NIXOS_OZONE_WL. It turns out the relevant line is commented out, and there is a link to this thread. nixpkgs/pkgs/applications/misc/1password-gui/linux.nix at 61b6a6ae6f11d013ab29cc85e0234fa2001af8dd · NixOS/nixpkgs · GitHub

I suppose I can see why they think lack of copy functionality is a reason to keep the app running in X11 mode. But it’s kinda inconvenient for me since I’m using a window manager that doesn’t implement XWayland."

Which in that commit had:

 # Currently half broken on wayland (e.g. no copy functionality)
      # See: https://github.com/NixOS/nixpkgs/pull/232718#issuecomment-1582123406
      # Remove this comment when upstream fixes:
      # https://1password.community/discussion/comment/624011/#Comment_624011
      #--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

Which leads to: _1password-gui: 8.10.4 -> 8.10.6 by amaxine · Pull Request #232718 · NixOS/nixpkgs · GitHub

where essentially nix disables wayland for _1password-gui as it’s currently half broken (copying does not work). xWayland works fine for now.

1 Like