Skip to content

Commit

Permalink
Make installing the 1Password package optional
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Aigeruth committed Jun 15, 2024
1 parent 6519f1b commit 85dafae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nix/shell-plugins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ in {
options = {
programs._1password-shell-plugins = {
enable = mkEnableOption "1Password Shell Plugins";
package = mkPackageOption pkgs "_1password" { };
package = mkPackageOption pkgs "_1password" { nullable = true; };
plugins = mkOption {
type = types.listOf types.package;
default = [ ];
Expand Down Expand Up @@ -63,7 +63,7 @@ in {
name = package;
value = "op plugin run -- ${package}";
}) pkg-exe-names);
packages = [ cfg.package ] ++ cfg.plugins;
packages = lib.optional (cfg.package != null) cfg.package ++ cfg.plugins;
in mkIf cfg.enable (mkMerge [
({
programs = {
Expand Down

0 comments on commit 85dafae

Please sign in to comment.