Skip to content

Commit 85dafae

Browse files
committed
Make installing the 1Password package optional
1Password CLI requires setting the group to onepassword-cli. This isn't possible when home-manager is installed in standalone mode (e.g. Ubuntu or other distributions). Opting out of installing the 1Password CLI with nix allows using the system-wide installation (e.g. via apt).
1 parent 6519f1b commit 85dafae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nix/shell-plugins.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ in {
2121
options = {
2222
programs._1password-shell-plugins = {
2323
enable = mkEnableOption "1Password Shell Plugins";
24-
package = mkPackageOption pkgs "_1password" { };
24+
package = mkPackageOption pkgs "_1password" { nullable = true; };
2525
plugins = mkOption {
2626
type = types.listOf types.package;
2727
default = [ ];
@@ -63,7 +63,7 @@ in {
6363
name = package;
6464
value = "op plugin run -- ${package}";
6565
}) pkg-exe-names);
66-
packages = [ cfg.package ] ++ cfg.plugins;
66+
packages = lib.optional (cfg.package != null) cfg.package ++ cfg.plugins;
6767
in mkIf cfg.enable (mkMerge [
6868
({
6969
programs = {

0 commit comments

Comments
 (0)