File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 88 pkgs . runCommand "op-plugin-list" { }
99 # 1Password CLI tries to create the config directory automatically, so set a temp XDG_CONFIG_HOME
1010 # since we don't actually need it for this
11- "mkdir $out && XDG_CONFIG_HOME=$out ${ pkgs . _1password } /bin/op plugin list | cut -d ' ' -f1 | tail -n +2 > $out/plugins.txt"
11+ "mkdir $out && XDG_CONFIG_HOME=$out ${ getExe cfg . cliPackage } plugin list | cut -d ' ' -f1 | tail -n +2 > $out/plugins.txt"
1212 } /plugins.txt" ) ;
1313 getExeName = package :
1414 # NOTE: SAFETY: This is okay because the `packages` list is also referred
2121 options = {
2222 programs . _1password-shell-plugins = {
2323 enable = mkEnableOption "1Password Shell Plugins" ;
24+ cliPackage = mkOption {
25+ type = types . package ;
26+ default = pkgs . _1password-cli ;
27+ description = ''
28+ The 1Password CLI package
29+ '' ;
30+ } ;
2431 plugins = mkOption {
2532 type = types . listOf types . package ;
2633 default = [ ] ;
6269 name = package ;
6370 value = "op plugin run -- ${ package } " ;
6471 } ) pkg-exe-names ) ;
65- packages = [ pkgs . _1password ] ++ cfg . plugins ;
72+ packages = [ cfg . cliPackage ] ++ cfg . plugins ;
6673 in mkIf cfg . enable ( mkMerge [
6774 ( {
6875 programs = {
You can’t perform that action at this time.
0 commit comments