From b8243a5f478c1c9ddaf822962fee42cd944c14eb Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 22 Oct 2024 18:05:06 -0400 Subject: [PATCH] vixen: add 1password gui --- configurations/nixos/vixen/default.nix | 1 + modules/nixos/linux/gui/_1password.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 modules/nixos/linux/gui/_1password.nix diff --git a/configurations/nixos/vixen/default.nix b/configurations/nixos/vixen/default.nix index bf636add..d6ef9584 100644 --- a/configurations/nixos/vixen/default.nix +++ b/configurations/nixos/vixen/default.nix @@ -10,6 +10,7 @@ in inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen4 ./configuration.nix (self + /modules/nixos/linux/gui/gnome.nix) + (self + /modules/nixos/linux/gui/_1password.nix) ]; services.openssh.enable = true; diff --git a/modules/nixos/linux/gui/_1password.nix b/modules/nixos/linux/gui/_1password.nix new file mode 100644 index 00000000..9818bc35 --- /dev/null +++ b/modules/nixos/linux/gui/_1password.nix @@ -0,0 +1,19 @@ +# https://nixos.wiki/wiki/1Password +{ lib, ... }: +{ + # 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; + # Certain features, including CLI integration and system authentication support, + # require enabling PolKit integration on some desktop environments (e.g. Plasma). + polkitPolicyOwners = [ "srid" ]; + }; +}