diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-11-22 11:49:47 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-11-22 11:49:47 +0100 |
commit | a4bcb26b1a3894022b08381079c2c402d49d611f (patch) | |
tree | c613faaea7626ee0fb6898bba7cd002d33c5cc51 /modules/services/misc/nix-daemon.nix | |
parent | 77891f8d59adc901eeb64401369c3691db8ed994 (diff) | |
download | nixpkgs-a4bcb26b1a3894022b08381079c2c402d49d611f.tar nixpkgs-a4bcb26b1a3894022b08381079c2c402d49d611f.tar.gz nixpkgs-a4bcb26b1a3894022b08381079c2c402d49d611f.tar.bz2 nixpkgs-a4bcb26b1a3894022b08381079c2c402d49d611f.tar.lz nixpkgs-a4bcb26b1a3894022b08381079c2c402d49d611f.tar.xz nixpkgs-a4bcb26b1a3894022b08381079c2c402d49d611f.tar.zst nixpkgs-a4bcb26b1a3894022b08381079c2c402d49d611f.zip |
Add options for specifying binary caches
Diffstat (limited to 'modules/services/misc/nix-daemon.nix')
-rw-r--r-- | modules/services/misc/nix-daemon.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index eeb26ee5e15..5af2d19a839 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -194,7 +194,29 @@ in ''; }; + binaryCaches = mkOption { + default = [ http://nixos.org/binary-cache ]; + type = types.list types.string; + description = '' + List of binary cache URLs used to obtain pre-built binaries + of Nix packages. + ''; + }; + + trustedBinaryCaches = mkOption { + default = [ ]; + example = [ http://hydra.nixos.org/ ]; + type = types.list types.string; + description = '' + List of binary cache URLs that non-root users can use (in + addition to those specified using + <option>nix.binaryCaches</option> by passing + <literal>--option binary-caches</literal> to Nix commands. + ''; + }; + }; + }; @@ -225,6 +247,8 @@ in build-max-jobs = ${toString (cfg.maxJobs)} build-use-chroot = ${if cfg.useChroot then "true" else "false"} build-chroot-dirs = ${toString cfg.chrootDirs} $(echo $extraPaths) + binary-caches = ${toString config.nix.binaryCaches} + trusted-binary-caches = ${toString config.nix.trustedBinaryCaches} $extraOptions END ''; |