Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh: support extra settings in oh-my-zsh plugins #1106

Merged
merged 4 commits into from
Mar 25, 2020

Conversation

carlostome
Copy link
Contributor

Hi,

I've added support to pass settings to plugins.

My use case is adding indentities to ssh-agent (oh-my-zsh/ssh-agent).

If there is a more direct way to achieve so, I'll be glad to hear.

Copy link
Member

@rycee rycee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not completely certain what the best solution is but this seems OK to me.

@dermetfan seems OK to you?

modules/programs/zsh.nix Outdated Show resolved Hide resolved
modules/programs/zsh.nix Outdated Show resolved Hide resolved
Copy link
Collaborator

@dermetfan dermetfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could initExtraBeforeCompInit not be used for this? Though in order to only include the extra config when oh-my-zsh is enabled the user would have to check that on his own, like this:

programs.zsh.initExtraBeforeCompInit = lib.optionalString config.programs.zsh.oh-my-zsh.enable ''
  zstyle :omz:plugins:ssh-agent identities id_rsa id_rsa2 id_github
'';

I'm OK with this PR to make this use case more ergonomic, once @rycee's suggestions are applied.

@carlostome carlostome force-pushed the master branch 2 times, most recently from 4988257 to ada2e80 Compare March 25, 2020 10:04
Carlos Tomé and others added 2 commits March 25, 2020 11:05
Co-Authored-By: Robert Helgesson <robert@rycee.net>
Co-Authored-By: Robert Helgesson <robert@rycee.net>
@carlostome
Copy link
Contributor Author

I applied your suggestions, you can squash and merge. Many thanks!

modules/programs/zsh.nix Outdated Show resolved Hide resolved
@dermetfan dermetfan merged commit 7fa8904 into nix-community:master Mar 25, 2020
github-actions bot added a commit to utdemir/dotfiles-nix that referenced this pull request Apr 9, 2020
Dependencies updates.

## Changelog for home-manager:
Commits: [nix-community/home-manager@9ab4e70d...5cdbfc90](nix-community/home-manager@9ab4e70...5cdbfc9)

* [`9ab59dd6`](nix-community/home-manager@9ab59dd) home-manager: handle args with spaces to doBuildAttr
* [`03b622b3`](nix-community/home-manager@03b622b) Bump copyright year
* [`ef148ab3`](nix-community/home-manager@ef148ab) newsboat: show queries before urls
* [`aedde6dc`](nix-community/home-manager@aedde6d) contributing: add note about news entry for new modules
* [`2fcdf3df`](nix-community/home-manager@2fcdf3d) contributing: add section about tests
* [`02d60400`](nix-community/home-manager@02d6040) sway: add module
* [`2f726bbd`](nix-community/home-manager@2f726bb) bash, fish, zsh: fix shellAliases example
* [`acf106ce`](nix-community/home-manager@acf106c) starship: give `settings` option more specific type
* [`7bd043e9`](nix-community/home-manager@7bd043e) xresources: give `properties` option more specific type
* [`28401ddd`](nix-community/home-manager@28401dd) systemd: skip services taking an instance parameter
* [`6fc6c736`](nix-community/home-manager@6fc6c73) tests: bump nmt version
* [`2678fb34`](nix-community/home-manager@2678fb3) format: pin Nixpkgs version
* [`0a1ce539`](nix-community/home-manager@0a1ce53) abook: add module
* [`a6657d6b`](nix-community/home-manager@a6657d6) sway: fix floating modifier description
* [`f3fbb50b`](nix-community/home-manager@f3fbb50) polybar: add test case
* [`1a4c10e9`](nix-community/home-manager@1a4c10e) ci: run tests with `--pure`
* [`faa29456`](nix-community/home-manager@faa2945) tests: remove package dependencies on rofi and abook
* [`71c7aaee`](nix-community/home-manager@71c7aae) fzf: support fish integration
* [`9a1feb5b`](nix-community/home-manager@9a1feb5) git: fix the config output formatting
* [`a11cf1de`](nix-community/home-manager@a11cf1d) fish: allow arguments to functions
* [`c7b43786`](nix-community/home-manager@c7b4378) README: add link to main manual page
* [`efbe1383`](nix-community/home-manager@efbe138) nixos integration: add option 'useGlobalPkgs'
* [`b36d3e02`](nix-community/home-manager@b36d3e0) news: fix condition
* [`0056a5ae`](nix-community/home-manager@0056a5a) debug: add module
* [`60a939bd`](nix-community/home-manager@60a939b) programs.lieer: add module
* [`9f46d516`](nix-community/home-manager@9f46d51) services.lieer: add module
* [`5c1e7349`](nix-community/home-manager@5c1e734) lieer: remove package dependency in tests
* [`2681568f`](nix-community/home-manager@2681568) firefox: support user content CSS
* [`cc386e4b`](nix-community/home-manager@cc386e4) firefox: prepare for updated sideloading behavior
* [`2cd16846`](nix-community/home-manager@2cd1684) keynav: add module
* [`37694e9f`](nix-community/home-manager@37694e9) files: add `force` flag
* [`b9d4f552`](nix-community/home-manager@b9d4f55) firefox: force extension file linking
* [`3673107b`](nix-community/home-manager@3673107) termite: fix the key for bold foreground color
* [`ac9e44a8`](nix-community/home-manager@ac9e44a) lib: add GVariant datatype and functions
* [`0f11a79e`](nix-community/home-manager@0f11a79) dconf: make `settings` have type `gvariant`
* [`fe145b12`](nix-community/home-manager@fe145b1) vscode: fix extension path symlink error
* [`8571e568`](nix-community/home-manager@8571e56) sway: fix onChange when defunct sockets exist
* [`f080f292`](nix-community/home-manager@f080f29) faq: outline how to override packages
* [`19dd9866`](nix-community/home-manager@19dd986) dunst: install man pages
* [`d11803d7`](nix-community/home-manager@d11803d) syncthing: install man pages to user profile
* [`e2414c4a`](nix-community/home-manager@e2414c4) systemd: improve systemd-activate.rb script
* [`78a0bbb3`](nix-community/home-manager@78a0bbb) picom: add module
* [`7fa89046`](nix-community/home-manager@7fa8904) zsh: support extra settings in oh-my-zsh plugins (nix-community/home-manager#1106)
* [`5969551a`](nix-community/home-manager@5969551) home-manager: add instantiate subcommand
* [`14f83a46`](nix-community/home-manager@14f83a4) kakoune: fix set option
* [`dd93c300`](nix-community/home-manager@dd93c30) vim: avoid using alias of vim-sensible
* [`a128e359`](nix-community/home-manager@a128e35) Update nixfmt and apply to a few more files
* [`1cfc0a32`](nix-community/home-manager@1cfc0a3) sxhkd: add dummy package in tests
* [`5ff24579`](nix-community/home-manager@5ff2457) gtk: add bookmarks option
* [`1fd874b7`](nix-community/home-manager@1fd874b) go: add goPrivate option
* [`f56c4187`](nix-community/home-manager@f56c418) screen-locker: add option `enableDetectSleep`
* [`dd538c29`](nix-community/home-manager@dd538c2) home-environment: add option `sessionVariablesExtra`
* [`d06bcf4c`](nix-community/home-manager@d06bcf4) targets.genericLinux: add module
* [`b7737f17`](nix-community/home-manager@b7737f1) qutebrowser: add module
* [`068ff76a`](nix-community/home-manager@068ff76) gitlab-ci: improve NUR update trigger
* [`5cdbfc90`](nix-community/home-manager@5cdbfc9) Add code owners and pull request template
utdemir pushed a commit to utdemir/dotfiles-nix that referenced this pull request Apr 9, 2020
Dependencies updates.

## Changelog for home-manager:
Commits: [nix-community/home-manager@9ab4e70d...5cdbfc90](nix-community/home-manager@9ab4e70...5cdbfc9)

* [`9ab59dd6`](nix-community/home-manager@9ab59dd) home-manager: handle args with spaces to doBuildAttr
* [`03b622b3`](nix-community/home-manager@03b622b) Bump copyright year
* [`ef148ab3`](nix-community/home-manager@ef148ab) newsboat: show queries before urls
* [`aedde6dc`](nix-community/home-manager@aedde6d) contributing: add note about news entry for new modules
* [`2fcdf3df`](nix-community/home-manager@2fcdf3d) contributing: add section about tests
* [`02d60400`](nix-community/home-manager@02d6040) sway: add module
* [`2f726bbd`](nix-community/home-manager@2f726bb) bash, fish, zsh: fix shellAliases example
* [`acf106ce`](nix-community/home-manager@acf106c) starship: give `settings` option more specific type
* [`7bd043e9`](nix-community/home-manager@7bd043e) xresources: give `properties` option more specific type
* [`28401ddd`](nix-community/home-manager@28401dd) systemd: skip services taking an instance parameter
* [`6fc6c736`](nix-community/home-manager@6fc6c73) tests: bump nmt version
* [`2678fb34`](nix-community/home-manager@2678fb3) format: pin Nixpkgs version
* [`0a1ce539`](nix-community/home-manager@0a1ce53) abook: add module
* [`a6657d6b`](nix-community/home-manager@a6657d6) sway: fix floating modifier description
* [`f3fbb50b`](nix-community/home-manager@f3fbb50) polybar: add test case
* [`1a4c10e9`](nix-community/home-manager@1a4c10e) ci: run tests with `--pure`
* [`faa29456`](nix-community/home-manager@faa2945) tests: remove package dependencies on rofi and abook
* [`71c7aaee`](nix-community/home-manager@71c7aae) fzf: support fish integration
* [`9a1feb5b`](nix-community/home-manager@9a1feb5) git: fix the config output formatting
* [`a11cf1de`](nix-community/home-manager@a11cf1d) fish: allow arguments to functions
* [`c7b43786`](nix-community/home-manager@c7b4378) README: add link to main manual page
* [`efbe1383`](nix-community/home-manager@efbe138) nixos integration: add option 'useGlobalPkgs'
* [`b36d3e02`](nix-community/home-manager@b36d3e0) news: fix condition
* [`0056a5ae`](nix-community/home-manager@0056a5a) debug: add module
* [`60a939bd`](nix-community/home-manager@60a939b) programs.lieer: add module
* [`9f46d516`](nix-community/home-manager@9f46d51) services.lieer: add module
* [`5c1e7349`](nix-community/home-manager@5c1e734) lieer: remove package dependency in tests
* [`2681568f`](nix-community/home-manager@2681568) firefox: support user content CSS
* [`cc386e4b`](nix-community/home-manager@cc386e4) firefox: prepare for updated sideloading behavior
* [`2cd16846`](nix-community/home-manager@2cd1684) keynav: add module
* [`37694e9f`](nix-community/home-manager@37694e9) files: add `force` flag
* [`b9d4f552`](nix-community/home-manager@b9d4f55) firefox: force extension file linking
* [`3673107b`](nix-community/home-manager@3673107) termite: fix the key for bold foreground color
* [`ac9e44a8`](nix-community/home-manager@ac9e44a) lib: add GVariant datatype and functions
* [`0f11a79e`](nix-community/home-manager@0f11a79) dconf: make `settings` have type `gvariant`
* [`fe145b12`](nix-community/home-manager@fe145b1) vscode: fix extension path symlink error
* [`8571e568`](nix-community/home-manager@8571e56) sway: fix onChange when defunct sockets exist
* [`f080f292`](nix-community/home-manager@f080f29) faq: outline how to override packages
* [`19dd9866`](nix-community/home-manager@19dd986) dunst: install man pages
* [`d11803d7`](nix-community/home-manager@d11803d) syncthing: install man pages to user profile
* [`e2414c4a`](nix-community/home-manager@e2414c4) systemd: improve systemd-activate.rb script
* [`78a0bbb3`](nix-community/home-manager@78a0bbb) picom: add module
* [`7fa89046`](nix-community/home-manager@7fa8904) zsh: support extra settings in oh-my-zsh plugins (nix-community/home-manager#1106)
* [`5969551a`](nix-community/home-manager@5969551) home-manager: add instantiate subcommand
* [`14f83a46`](nix-community/home-manager@14f83a4) kakoune: fix set option
* [`dd93c300`](nix-community/home-manager@dd93c30) vim: avoid using alias of vim-sensible
* [`a128e359`](nix-community/home-manager@a128e35) Update nixfmt and apply to a few more files
* [`1cfc0a32`](nix-community/home-manager@1cfc0a3) sxhkd: add dummy package in tests
* [`5ff24579`](nix-community/home-manager@5ff2457) gtk: add bookmarks option
* [`1fd874b7`](nix-community/home-manager@1fd874b) go: add goPrivate option
* [`f56c4187`](nix-community/home-manager@f56c418) screen-locker: add option `enableDetectSleep`
* [`dd538c29`](nix-community/home-manager@dd538c2) home-environment: add option `sessionVariablesExtra`
* [`d06bcf4c`](nix-community/home-manager@d06bcf4) targets.genericLinux: add module
* [`b7737f17`](nix-community/home-manager@b7737f1) qutebrowser: add module
* [`068ff76a`](nix-community/home-manager@068ff76) gitlab-ci: improve NUR update trigger
* [`5cdbfc90`](nix-community/home-manager@5cdbfc9) Add code owners and pull request template

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
jorsn pushed a commit to jorsn/home-manager that referenced this pull request Apr 25, 2020
Co-Authored-By: Robert Helgesson <robert@rycee.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants