summaryrefslogtreecommitdiffstats
path: root/krebs/krops.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-11-27 21:06:20 +0100
committerlassulus <lassulus@lassul.us>2018-11-28 12:36:18 +0100
commit61f1aba8bc69dc522710d5871545cf4b4ec8645b (patch)
treef18b9c51ba927fd1056b27a871bd754a244c03a6 /krebs/krops.nix
parentd094f265061cc84d4c13082ae0a8909d8942f821 (diff)
* krops: get nixpkgs from store for ci
Diffstat (limited to 'krebs/krops.nix')
-rw-r--r--krebs/krops.nix16
1 files changed, 15 insertions, 1 deletions
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";