summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-08-21 11:54:46 +0200
committermakefu <github@syntax-fehler.de>2016-08-21 11:54:46 +0200
commit79e3a3dad36f67296001f269e6716a1bd21c983c (patch)
tree496b136bc93e2708397495db30380d4d8d286aa3
parent96f862ced4e621f88bcbf7d1ad4ea1d8422f53d7 (diff)
m 3 populate: allow minimal populate
-rw-r--r--makefu/2configs/default.nix15
-rw-r--r--makefu/3modules/populate.nix5
2 files changed, 16 insertions, 4 deletions
diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix
index 7e4c87cfb..cdaa38f27 100644
--- a/makefu/2configs/default.nix
+++ b/makefu/2configs/default.nix
@@ -22,10 +22,17 @@ with config.krebs.lib;
build = {
user = config.krebs.users.makefu;
source = let inherit (config.krebs.build) host user; in {
- nixpkgs.git = {
- url = https://github.com/nixos/nixpkgs;
- ref = "125ffff"; # stable @ 2016-07-20
- };
+ nixpkgs = if config.makefu.full-populate or (getEnv "dummy_secrets" == "true") then
+ { # 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 =
if getEnv "dummy_secrets" == "true"
then toString <stockholm/makefu/6tests/data/secrets>
diff --git a/makefu/3modules/populate.nix b/makefu/3modules/populate.nix
new file mode 100644
index 000000000..19d3b3690
--- /dev/null
+++ b/makefu/3modules/populate.nix
@@ -0,0 +1,5 @@
+{config, lib, pkgs, ... }:
+
+{
+ options.makefu.full-populate = lib.mkEnableOption "always do a full clone of nixpkgs";
+}