summary refs log tree commit diff
path: root/modules/misc/nixpkgs.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-11-23 16:07:00 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-11-23 16:07:00 +0000
commitc958902d4473e6abec41e383d43c28f7ec674a09 (patch)
treecc6735be05f4bc0b33d2225fb96d05e80d8ac85b /modules/misc/nixpkgs.nix
parentfcf53be5bd1ce31bd0862bdeb5144e388a07a4b7 (diff)
downloadnixpkgs-c958902d4473e6abec41e383d43c28f7ec674a09.tar
nixpkgs-c958902d4473e6abec41e383d43c28f7ec674a09.tar.gz
nixpkgs-c958902d4473e6abec41e383d43c28f7ec674a09.tar.bz2
nixpkgs-c958902d4473e6abec41e383d43c28f7ec674a09.tar.lz
nixpkgs-c958902d4473e6abec41e383d43c28f7ec674a09.tar.xz
nixpkgs-c958902d4473e6abec41e383d43c28f7ec674a09.tar.zst
nixpkgs-c958902d4473e6abec41e383d43c28f7ec674a09.zip
* Added an option "nixpkgs.system" to specify the system type for
  which NixOS should be built.  This is useful in NixOS network
  specifications, because it allows machines in the network to have
  different types, e.g.,

    {
      machine1 =
        { config, pkgs, ... }:
        { nixpkgs.system = "i686-linux";
          ... other config ...
        };

      machine2 =
        { config, pkgs, ... }:
        { nixpkgs.system = "x86_64-linux";
          ... other config ...
        };
    }

  It can also be useful in distributed NixOS tests.

svn path=/nixos/trunk/; revision=24823
Diffstat (limited to 'modules/misc/nixpkgs.nix')
-rw-r--r--modules/misc/nixpkgs.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/misc/nixpkgs.nix b/modules/misc/nixpkgs.nix
index 8173d716d84..d940b32dbd5 100644
--- a/modules/misc/nixpkgs.nix
+++ b/modules/misc/nixpkgs.nix
@@ -13,6 +13,17 @@
       '';
     };
 
+    nixpkgs.system = pkgs.lib.mkOption {
+      default = "";
+      description = ''
+        Specifies the Nix platform type for which NixOS should be built.
+        If unset, it defaults to the platform type of your host system
+        (<literal>${builtins.currentSystem}</literal>).
+        Specifying this option is useful when doing distributed
+        multi-platform deployment, or when building virtual machines.
+      '';
+    };
+
     nixpkgs.platform = pkgs.lib.mkOption {
       default = pkgs.platforms.pc;
       description = ''