summary refs log tree commit diff
path: root/modules/misc/nixpkgs.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-08-26 16:52:38 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-08-26 16:52:38 +0000
commit6f1b1aefde5a06d3317e1350d61a33b263cfc3e7 (patch)
tree733b20c10c9a9f1248af03c8bc7cb230706038a0 /modules/misc/nixpkgs.nix
parentff146aee081971b883a763d2860c6b0cdbf0afb2 (diff)
downloadnixpkgs-6f1b1aefde5a06d3317e1350d61a33b263cfc3e7.tar
nixpkgs-6f1b1aefde5a06d3317e1350d61a33b263cfc3e7.tar.gz
nixpkgs-6f1b1aefde5a06d3317e1350d61a33b263cfc3e7.tar.bz2
nixpkgs-6f1b1aefde5a06d3317e1350d61a33b263cfc3e7.tar.lz
nixpkgs-6f1b1aefde5a06d3317e1350d61a33b263cfc3e7.tar.xz
nixpkgs-6f1b1aefde5a06d3317e1350d61a33b263cfc3e7.tar.zst
nixpkgs-6f1b1aefde5a06d3317e1350d61a33b263cfc3e7.zip
* Added an option `nixpkgs.config' that allows the Nixpkgs options to
  be set from the NixOS configuration.  For instance, you can say

    nixpkgs.config.firefox.enableGeckoMediaPlayer = true;

    environment.systemPackages = [ pkgs.firefox ];

  but the more interesting application is to apply global overrides to
  Nixpkgs throughout NixOS, e.g.

    nixpkgs.config.packageOverrides = pkgs:
      { glibc = pkgs.glibc27;
        gcc = pkgs.gcc42;
      };

  would build the whole system with Glibc 2.7 and GCC 4.2.  (There are
  some issues with "useFromStdenv" in all-packages.nix that need to be
  fixed for packages in the stdenv bootstrap though.)

  The implementation of this option is kind of evil though due to the
  need to prevent a circularity between the evaluation of
  nixpkgs.config and the "pkgs" module argument.

svn path=/nixos/trunk/; revision=16866
Diffstat (limited to 'modules/misc/nixpkgs.nix')
-rw-r--r--modules/misc/nixpkgs.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/misc/nixpkgs.nix b/modules/misc/nixpkgs.nix
new file mode 100644
index 00000000000..68e7e2517f9
--- /dev/null
+++ b/modules/misc/nixpkgs.nix
@@ -0,0 +1,17 @@
+{ config, pkgs, ... }:
+
+{
+  options = {
+
+    nixpkgs.config = pkgs.lib.mkOption {
+      default = {};
+      example = {
+        firefox.enableGeckoMediaPlayer = true;
+      };
+      description = ''
+        The configuration of the Nix Packages collection.
+      '';
+    };
+
+  };
+}
\ No newline at end of file