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

How to disable Nix channels? #1024

Closed
thecaralice opened this issue Aug 2, 2024 · 3 comments · Fixed by #1026
Closed

How to disable Nix channels? #1024

thecaralice opened this issue Aug 2, 2024 · 3 comments · Fixed by #1026

Comments

@thecaralice
Copy link
Contributor

I manage my system with flakes, so channels sometimes lead to surprising results.
I tried settings nix.channel.enable = false as it is on NixOS but found out that this is not an option.

@Enzime
Copy link
Collaborator

Enzime commented Aug 2, 2024

We don’t have an equivalent option, any PRs to add logic mirroring that from NixOS would be appreciated

The module can be found here: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/config/nix-channel.nix

@thecaralice
Copy link
Contributor Author

Yeah, I'm already working on it!

@thecaralice
Copy link
Contributor Author

@Enzime I stumbled upon

(mkIf (config.system.stateVersion > 3) (mkOrder 1200
[ { darwin-config = "${config.environment.darwinConfig}"; }
"/nix/var/nix/profiles/per-user/root/channels"
]))
which is in contrary with what NixOS does. Is it really needed? I'm in favor of mirroring NixOS behavior here, i.e. demote it to mkDefault priority and move this default to the option declaration.

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 a pull request may close this issue.

2 participants