nixpkgs/modules/misc/nixpkgs.nix
Eelco Dolstra c958902d44 * 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
2010-11-23 16:07:00 +00:00

35 lines
891 B
Nix

{ config, pkgs, ... }:
{
options = {
nixpkgs.config = pkgs.lib.mkOption {
default = {};
example = {
firefox.enableGeckoMediaPlayer = true;
};
description = ''
The configuration of the Nix Packages collection.
'';
};
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 = ''
The platform for the Nix Packages collection.
'';
};
};
}