1Password

From NixOS Wiki
Revision as of 03:38, 10 July 2023 by Pluiedev (talk | contribs) (Add instructions on how to install 1Password correctly on NixOS)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Using 1Password on NixOS

If you're using NixOS, you can enable 1Password and its GUI by:

Breeze-text-x-plain.png
/etc/nixos/configuration.nix
{ config, lib, pkgs, ... }:
{
  # Enable the unfree 1Password packages
  nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
    "1password-gui"
    "1password"
  ];
  # Alternatively, you could also just allow all unfree packages
  # nixpkgs.config.allowUnfree = true;

  programs._1password.enable = true;
  programs._1password-gui = {
    enable = true;
    # When integrating the CLI with the GUI, PolKit integration needs to be enabled
    # on some desktop environments (e.g. Plasma) - hence, if you want to use the CLI,
    # you need to provide your username here.
    polkitPolicyOwners = [ "yourUsernameHere" ];
  };
  ...
}


On non-NixOS installs (TODO)