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

replacing and disabling modules with new api #310

Closed
almostnobody opened this issue Jun 8, 2021 · 3 comments
Closed

replacing and disabling modules with new api #310

almostnobody opened this issue Jun 8, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@almostnobody
Copy link
Contributor

In the docs there is a:

You can also pull modules from other channels. All modules have access to the modulesPath for each channel as ModulesPath. And you can use disabledModules to remove modules from the current channel.

Pulling the zsh module from the latest channel:

{ latestModulesPath }: {
  modules = [ "${latestModulesPath}/programs/zsh/zsh.nix" ];
  disabledModules = [ "programs/zsh/zsh.nix" ];
}

but it's unclear where it is supposed to be put/used

I'm filing it as a bug, since it's an issue with docs, but i would appreciate the advice, and willing to fix the docs

@almostnobody almostnobody added the bug Something isn't working label Jun 8, 2021
@almostnobody
Copy link
Contributor Author

my personal issue is that i want to add a module from a specific channel to a specific host(exclusively that host)

@almostnobody
Copy link
Contributor Author

turns out it's a regular nix code

{ latestModulesPath }: {
  import = [ "${latestModulesPath}/programs/zsh/zsh.nix" ];
  disabledModules = [ "programs/zsh/zsh.nix" ];
}

this kind of code works, not sure if it's the right way, and if the docs should be updated to make it more clear for newcomers

@Pacman99
Copy link
Member

Pacman99 commented Jun 8, 2021

Agreed thanks for opening this. The first issue is the docs should use imports, I messed that up. And the next issue is that the docs need to be more explicit that module overriding can happen in any module, whether its your host file, a profile, or a module in ./modules.

almostnobody added a commit to almostnobody/devos that referenced this issue Jun 8, 2021
Pacman99 added a commit that referenced this issue Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants