Jump to content

Overlays: Difference between revisions

397 bytes added ,  25 June 2018
m
Adds defaults to Using <tt>nixpkgs.overlays</tt> as <tt><nixpkgs-overlays></tt>
imported>Samueldr
m (Adds a sub-title as mediawiki references are hard to integrate with an existing list.)
imported>Samueldr
m (Adds defaults to Using <tt>nixpkgs.overlays</tt> as <tt><nixpkgs-overlays></tt>)
Line 41: Line 41:
===== Using <tt>nixpkgs.overlays</tt> as <tt><nixpkgs-overlays></tt> =====
===== Using <tt>nixpkgs.overlays</tt> as <tt><nixpkgs-overlays></tt> =====


In <tt>configuration.nix</tt>, add to <code>nix.nixPath</code>.
In <tt>configuration.nix</tt>, depending on whether your <tt>configuration.nix</tt> already defines <code>nix.nixPath</code>, add one of those definitions:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  # With existing `nix.nixPath` entry:
   nix.nixPath = [
   nix.nixPath = [
    # Add the following to existing entries.
     "nixpkgs-overlays=/etc/nixos/overlays-compat/"
     "nixpkgs-overlays=/etc/nixos/overlays-compat/"
   ];
   ];
  # Without any `nix.nixPath` entry:
  nix.nixPath =
    # Prepend default nixPath values.
    options.nix.nixPath.default ++
    # Append our nixpkgs-overlays.
    [ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ]
  ;
</syntaxhighlight>
</syntaxhighlight>


Anonymous user