NixOS modules: Difference between revisions

imported>Fzakaria
Added under the hood explanation by Infinisil
imported>Jtojnar
avoid deprecated github:NixOS/nixpkgs-channels
Line 272: Line 272:
</syntaxhighlight>
</syntaxhighlight>


If you're developing on top of master, this will potentially cause the compilation of lots of packages, since master is not cached on cache.nixos.org. To avoid that, you can develop your module on top of the <code>nixos-unstable</code> [[Channels|channel]], by adding <code>nixpkgs-channels</code> as a remote:
If you're developing on top of master, this will potentially cause the compilation of lots of packages, since changes on master might not cached on cache.nixos.org yet. To avoid that, you can develop your module on top of the <code>nixos-unstable</code> [[Channels|channel]], tracked by the eponymous branch in https://github.com/NixOS/nixpkgs:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git remote add -f channels https://github.com/NixOS/nixpkgs-channels
git checkout -b mymodule upstream/nixos-unstable
git checkout -b mymodule channels/nixos-unstable
</syntaxhighlight>
</syntaxhighlight>