···2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xml:id="chap-packageconfig">
45-<title><filename>~/.nixpkgs/config.nix</filename>: global configuration</title>
67<para>Nix packages can be configured to allow or deny certain options.</para>
89<para>To apply the configuration edit
10-<filename>~/.nixpkgs/config.nix</filename> and set it like
1112<programlisting>
13{
···8990<para>You can define a function called
91<varname>packageOverrides</varname> in your local
92-<filename>~/.nixpkgs/config.nix</filename> to overide nix packages. It
93must be a function that takes pkgs as an argument and return modified
94set of packages.
95
···2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xml:id="chap-packageconfig">
45+<title>Global configuration</title>
67<para>Nix packages can be configured to allow or deny certain options.</para>
89<para>To apply the configuration edit
10+<filename>~/.config/nixpkgs/config.nix</filename> and set it like
1112<programlisting>
13{
···8990<para>You can define a function called
91<varname>packageOverrides</varname> in your local
92+<filename>~/.config/nixpkgs/config.nix</filename> to overide nix packages. It
93must be a function that takes pkgs as an argument and return modified
94set of packages.
95
+1-1
doc/functions.xml
···119 evaluation-per-function application incurs a performance penalty,
120 which can become a problem if many overrides are used.
121 It is only intended for ad-hoc customisation, such as in
122- <filename>~/.nixpkgs/config.nix</filename>.
123 </para>
124 </warning>
125
···119 evaluation-per-function application incurs a performance penalty,
120 which can become a problem if many overrides are used.
121 It is only intended for ad-hoc customisation, such as in
122+ <filename>~/.config/nixpkgs/config.nix</filename>.
123 </para>
124 </warning>
125
+4-4
doc/languages-frameworks/haskell.md
···195 mtl-2.2.1
196197This function allows users to define their own development environment by means
198-of an override. After adding the following snippet to `~/.nixpkgs/config.nix`,
199200 {
201 packageOverrides = super: let self = super.pkgs; in
···522 $ cd ~/src/foo && cabal2nix . >default.nix
523 $ cd ~/src/bar && cabal2nix . >default.nix
524525-Then edit your `~/.nixpkgs/config.nix` file to register those builds in the
526default Haskell package set:
527528 {
···554to manipulate the package as much as you please. One useful application of this
555feature is to replace the default `mkDerivation` function with one that enables
556library profiling for all packages. To accomplish that, add configure the
557-following snippet in your `~/.nixpkgs/config.nix` file:
558559 {
560 packageOverrides = super: let self = super.pkgs; in
···583584 $ cabal2nix cabal://ghc-events-0.4.3.0 >~/.nixpkgs/ghc-events-0.4.3.0.nix
585586-Then add the override in `~/.nixpkgs/config.nix`:
587588 {
589 packageOverrides = super: let self = super.pkgs; in
···195 mtl-2.2.1
196197This function allows users to define their own development environment by means
198+of an override. After adding the following snippet to `~/.config/nixpkgs/config.nix`,
199200 {
201 packageOverrides = super: let self = super.pkgs; in
···522 $ cd ~/src/foo && cabal2nix . >default.nix
523 $ cd ~/src/bar && cabal2nix . >default.nix
524525+Then edit your `~/.config/nixpkgs/config.nix` file to register those builds in the
526default Haskell package set:
527528 {
···554to manipulate the package as much as you please. One useful application of this
555feature is to replace the default `mkDerivation` function with one that enables
556library profiling for all packages. To accomplish that, add configure the
557+following snippet in your `~/.config/nixpkgs/config.nix` file:
558559 {
560 packageOverrides = super: let self = super.pkgs; in
···583584 $ cabal2nix cabal://ghc-events-0.4.3.0 >~/.nixpkgs/ghc-events-0.4.3.0.nix
585586+Then add the override in `~/.config/nixpkgs/config.nix`:
587588 {
589 packageOverrides = super: let self = super.pkgs; in
+1-1
doc/package-notes.xml
···278</screen>
279280 to your Nixpkgs configuration
281- (<filename>~/.nixpkgs/config.nix</filename>) and install it by
282 running <command>nix-env -f '<nixpkgs>' -iA
283 myEclipse</command> and afterward run Eclipse as usual. It is
284 possible to find out which plugins are available for installation
···278</screen>
279280 to your Nixpkgs configuration
281+ (<filename>~/.config/nixpkgs/config.nix</filename>) and install it by
282 running <command>nix-env -f '<nixpkgs>' -iA
283 myEclipse</command> and afterward run Eclipse as usual. It is
284 possible to find out which plugins are available for installation
+4-4
lib/customisation.nix
···15 the original derivation attributes.
1617 `overrideDerivation' allows certain "ad-hoc" customisation
18- scenarios (e.g. in ~/.nixpkgs/config.nix). For instance, if you
19- want to "patch" the derivation returned by a package function in
20- Nixpkgs to build another version than what the function itself
21- provides, you can do something like this:
2223 mySed = overrideDerivation pkgs.gnused (oldAttrs: {
24 name = "sed-4.2.2-pre";
···15 the original derivation attributes.
1617 `overrideDerivation' allows certain "ad-hoc" customisation
18+ scenarios (e.g. in ~/.config/nixpkgs/config.nix). For instance,
19+ if you want to "patch" the derivation returned by a package
20+ function in Nixpkgs to build another version than what the
21+ function itself provides, you can do something like this:
2223 mySed = overrideDerivation pkgs.gnused (oldAttrs: {
24 name = "sed-4.2.2-pre";
+2-2
nixos/modules/services/editors/emacs.xml
···316 <para>
317 If you are not on NixOS or want to install this particular
318 Emacs only for yourself, you can do so by adding it to your
319- <filename>~/.nixpkgs/config.nix</filename>
320 (see <link xlink:href="http://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides">Nixpkgs manual</link>):
321 <example>
322- <title>Custom Emacs in <filename>~/.nixpkgs/system.nix</filename></title>
323 <programlisting><![CDATA[
324{
325 packageOverrides = super: let self = super.pkgs; in {
···316 <para>
317 If you are not on NixOS or want to install this particular
318 Emacs only for yourself, you can do so by adding it to your
319+ <filename>~/.config/nixpkgs/config.nix</filename>
320 (see <link xlink:href="http://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides">Nixpkgs manual</link>):
321 <example>
322+ <title>Custom Emacs in <filename>~/.config/nixpkgs/config.nix</filename></title>
323 <programlisting><![CDATA[
324{
325 packageOverrides = super: let self = super.pkgs; in {
+1-1
pkgs/development/r-modules/README.md
···4## Installation
56Define an environment for R that contains all the libraries that you'd like to
7-use by adding the following snippet to your $HOME/.nixpkgs/config.nix file:
89```nix
10{
···4## Installation
56Define an environment for R that contains all the libraries that you'd like to
7+use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
89```nix
10{
+1-1
pkgs/games/planetaryannihilation/default.nix
···6assert ((config.planetary_annihilation or null).sha256 or null) != null;
78/* to setup:
9- $ cat ~/.nixpkgs/config.nix
10 {
11 planetary_annihilation = {
12 url = "file:///home/user/PA_Linux_62857.tar.bz2";
···6assert ((config.planetary_annihilation or null).sha256 or null) != null;
78/* to setup:
9+ $ cat ~/.config/nixpkgs/config.nix
10 {
11 planetary_annihilation = {
12 url = "file:///home/user/PA_Linux_62857.tar.bz2";
+1-1
pkgs/stdenv/adapters.nix
···183184 This adapter can be defined on the defaultStdenv definition. You can
185 use it by patching the all-packages.nix file or by using the override
186- feature of ~/.nixpkgs/config.nix .
187 */
188 validateLicenses = licensePred: stdenv: stdenv //
189 { mkDerivation = args:
···183184 This adapter can be defined on the defaultStdenv definition. You can
185 use it by patching the all-packages.nix file or by using the override
186+ feature of ~/.config/nixpkgs/config.nix .
187 */
188 validateLicenses = licensePred: stdenv: stdenv //
189 { mkDerivation = args:
+1-1
pkgs/stdenv/generic/default.nix
···153154 b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
155 { allow${up reason} = true; }
156- to ~/.nixpkgs/config.nix.
157 ''));
158159 # Check if a derivation is valid, that is whether it passes checks for
···153154 b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
155 { allow${up reason} = true; }
156+ to ~/.config/nixpkgs/config.nix.
157 ''));
158159 # Check if a derivation is valid, that is whether it passes checks for
+5-3
pkgs/top-level/impure.nix
···17 system ? builtins.currentSystem
1819, # Fallback: The contents of the configuration file found at $NIXPKGS_CONFIG or
20- # $HOME/.nixpkgs/config.nix.
21 config ? let
22 configFile = getEnv "NIXPKGS_CONFIG";
23- configFile2 = homeDir + "/.nixpkgs/config.nix";
024 in
25 if configFile != "" && pathExists configFile then import configFile
26 else if homeDir != "" && pathExists configFile2 then import configFile2
027 else {}
2829, # Overlays are used to extend Nixpkgs collection with additional
···31 # fix-point made by Nixpkgs.
32 overlays ? let
33 dirPath = try (if pathExists <nixpkgs-overlays> then <nixpkgs-overlays> else "") "";
34- dirHome = homeDir + "/.nixpkgs/overlays";
35 dirCheck = dir: dir != "" && pathExists (dir + "/.");
36 overlays = dir:
37 let content = readDir dir; in
···17 system ? builtins.currentSystem
1819, # Fallback: The contents of the configuration file found at $NIXPKGS_CONFIG or
20+ # $HOME/.config/nixpkgs/config.nix.
21 config ? let
22 configFile = getEnv "NIXPKGS_CONFIG";
23+ configFile2 = homeDir + "/.config/nixpkgs/config.nix";
24+ configFile3 = homeDir + "/.nixpkgs/config.nix"; # obsolete
25 in
26 if configFile != "" && pathExists configFile then import configFile
27 else if homeDir != "" && pathExists configFile2 then import configFile2
28+ else if homeDir != "" && pathExists configFile3 then import configFile3
29 else {}
3031, # Overlays are used to extend Nixpkgs collection with additional
···33 # fix-point made by Nixpkgs.
34 overlays ? let
35 dirPath = try (if pathExists <nixpkgs-overlays> then <nixpkgs-overlays> else "") "";
36+ dirHome = homeDir + "/.config/nixpkgs/overlays";
37 dirCheck = dir: dir != "" && pathExists (dir + "/.");
38 overlays = dir:
39 let content = readDir dir; in