From 61f1aba8bc69dc522710d5871545cf4b4ec8645b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 27 Nov 2018 21:06:20 +0100 Subject: * krops: get nixpkgs from store for ci --- krebs/krops.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'krebs/krops.nix') diff --git a/krebs/krops.nix b/krebs/krops.nix index 763e76b83..425fba8f5 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -7,11 +7,24 @@ # TODO document why pkgs should be used like this pkgs = import "${krops}/pkgs" {}; - krebs-source = { + krebs-nixpkgs = { test ? false }: if test then { + nixpkgs.file = { + path = toString (pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = (lib.importJSON ./nixpkgs.json).rev; + sha256 = (lib.importJSON ./nixpkgs.json).sha256; + }); + useChecksum = true; + }; + } else { nixpkgs.git = { ref = (lib.importJSON ./nixpkgs.json).rev; url = https://github.com/NixOS/nixpkgs; }; + }; + + krebs-source = { stockholm.file = toString ../.; stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" '' set -efu @@ -28,6 +41,7 @@ }; source ={ test }: lib.evalSource [ + (krebs-nixpkgs { test = test; }) krebs-source { nixos-config.symlink = "stockholm/krebs/1systems/${name}/config.nix"; -- cgit v1.2.3