FAQ/Pinning Nixpkgs: Difference between revisions
imported>Zie How to upgrade a single package and service to an unstable version |
imported>Zie m formatting cleanup |
||
Line 16: | Line 16: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
then in <code>configuration.nix</code> allow unstable packages: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
# Allow unstable packages. | # Allow unstable packages. | ||
Line 38: | Line 39: | ||
]; | ]; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This will use unstable bind and dnsutils, but the stable vim. | |||
Except bind is a service, and if you want a service....usually you just do something like: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 47: | Line 48: | ||
... | ... | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Except services will refer to <code>pkgs.bind</code>, not <code>pkgs.unstable.bind</code> | Except services will refer to <code>pkgs.bind</code>, not <code>pkgs.unstable.bind</code> | ||
so disable services.bind and create your own: | so disable services.bind and create your own: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
users.users.named = | users.users.named = | ||
Line 78: | Line 81: | ||
where all the stuff just comes from the bind services definition(which you can get from the source link on the nixos options page.) | where all the stuff just comes from the bind services definition(which you can get from the source link on the nixos options page.) | ||
Just replace named variables, and replace | Just replace named variables, and replace <code>${pkgs.bind.out</code> with <code>${pkgs.unstable.bind.out}</code> | ||