* krops: get nixpkgs from store for ci

This commit is contained in:
lassulus 2018-11-27 21:06:20 +01:00
parent d094f26506
commit 61f1aba8bc
5 changed files with 32 additions and 2 deletions

View File

@ -1,11 +1,13 @@
{ name }: let
inherit (import ../krebs/krops.nix { inherit name; })
krebs-nixpkgs
krebs-source
lib
pkgs
;
source = { test }: lib.evalSource [
(krebs-nixpkgs { test = test; })
krebs-source
{
nixos-config.symlink = "stockholm/jeschli/1systems/${name}/config.nix";

View File

@ -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";

View File

@ -1,5 +1,6 @@
{ name }: let
inherit (import ../krebs/krops.nix { inherit name; })
krebs-nixpkgs
krebs-source
lib
pkgs
@ -12,6 +13,7 @@
;
source = { test }: lib.evalSource [
(krebs-nixpkgs { test = test; })
krebs-source
{
nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix";

View File

@ -23,7 +23,17 @@
{
# nixos-18.09 @ 2018-09-18
# + uhub/sqlite: 5dd7610401747
nixpkgs = if test || host-src.full then {
nixpkgs = if test then {
file = {
path = toString (pkgs.fetchFromGitHub {
owner = "makefu";
repo = "nixpkgs";
rev = nixpkgs-src.rev;
sha256 = nixpkgs-src.sha256;
});
useChecksum = true;
};
} else if host-src.full then {
git.ref = nixpkgs-src.rev;
git.url = nixpkgs-src.url;
} else if host-src.arm6 then {

View File

@ -1,12 +1,14 @@
{ name }: rec {
inherit (import ../krebs/krops.nix { inherit name; })
krebs-nixpkgs
krebs-source
lib
pkgs
;
source = lib.evalSource [
(krebs-nixpkgs { test = true; })
krebs-source
{
nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix";