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

Support disabledModules #602

Closed
Jomik opened this issue Mar 3, 2019 · 6 comments
Closed

Support disabledModules #602

Jomik opened this issue Mar 3, 2019 · 6 comments

Comments

@Jomik
Copy link
Contributor

Jomik commented Mar 3, 2019

We should support something like NixOS's disabledModules: https://nixos.org/nixos/manual/index.html#sec-replace-modules
This is quite useful if you want to replace part of a module that you want to improve on or have work differently.
I stumbled upon this while trying to configure polybar.

@Jomik
Copy link
Contributor Author

Jomik commented Mar 4, 2019

I figured that this is on my end... I ended up having to set home-manager to use a channel, and then I could disable the module using disabledModules = [ <home-manager/modules/services/polybar.nix> ];
How would I go about disabling it using a relative path?

@kalbasit
Copy link
Collaborator

kalbasit commented Mar 7, 2019

@Jomik are you using a submodule of your git repository? If you're using a fetcher, such as builtins.fetchTarball, you can just use the $out of that fetcher.

@Jomik
Copy link
Contributor Author

Jomik commented Mar 8, 2019

I was using it through home-manager.path
So I could have prefixed it with that I guess :o

@Jomik Jomik closed this as completed Mar 21, 2019
rycee added a commit that referenced this issue Apr 7, 2019
This is needed, for example, to support relative paths when disabling
modules.

Related to #602.
@rycee
Copy link
Member

rycee commented Apr 7, 2019

With the above commit it should be possible to use

disabledModules = [ "services/polybar.nix" ];

@Jomik
Copy link
Contributor Author

Jomik commented Apr 7, 2019

Oh awesome

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/can-home-manager-install-unstable-and-stable-programs-modules-not-just-pkgs/42919/13

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

No branches or pull requests

4 participants