m 3 populate: allow minimal populate

This commit is contained in:
makefu 2016-08-21 11:54:46 +02:00
parent 96f862ced4
commit 79e3a3dad3
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
2 changed files with 16 additions and 4 deletions

View File

@ -22,10 +22,17 @@ with config.krebs.lib;
build = { build = {
user = config.krebs.users.makefu; user = config.krebs.users.makefu;
source = let inherit (config.krebs.build) host user; in { source = let inherit (config.krebs.build) host user; in {
nixpkgs.git = { nixpkgs = if config.makefu.full-populate or (getEnv "dummy_secrets" == "true") then
url = https://github.com/nixos/nixpkgs; { # stable @ 2016-07-20
ref = "125ffff"; # stable @ 2016-07-20 git = { url = https://github.com/nixos/nixpkgs; ref = "125ffff"; };
}; }
else
# TODO use http, once it is implemented
# right now it is simply extracted revision folder
## prepare so we do not have to wait for rsync:
## cd /var/src; curl https://github.com/nixos/nixpkgs/tarball/125ffff -L | tar zx && mv NixOS-nixpkgs-125ffff nixpkgs
{ file = "/home/makefu/store/125ffff";};
secrets.file = secrets.file =
if getEnv "dummy_secrets" == "true" if getEnv "dummy_secrets" == "true"
then toString <stockholm/makefu/6tests/data/secrets> then toString <stockholm/makefu/6tests/data/secrets>

View File

@ -0,0 +1,5 @@
{config, lib, pkgs, ... }:
{
options.makefu.full-populate = lib.mkEnableOption "always do a full clone of nixpkgs";
}