diff options
-rw-r--r-- | lass/1systems/coaxmetal/source.nix | 23 | ||||
-rw-r--r-- | lass/krops.nix | 2 |
2 files changed, 21 insertions, 4 deletions
diff --git a/lass/1systems/coaxmetal/source.nix b/lass/1systems/coaxmetal/source.nix index 0e2628b5b..7f335ec05 100644 --- a/lass/1systems/coaxmetal/source.nix +++ b/lass/1systems/coaxmetal/source.nix @@ -1,4 +1,21 @@ -{ lib, pkgs, ... }: -{ - nixpkgs.git.ref = lib.mkForce (lib.importJSON ../../../krebs/nixpkgs-unstable.json).rev; +{ lib, pkgs, test, ... }: let + npkgs = lib.importJSON ../../../krebs/nixpkgs-unstable.json; +in { + nixpkgs = lib.mkForce (if test then { derivation = let + rev = npkgs.rev; + sha256 = npkgs.sha256; + in '' + with import (builtins.fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; + sha256 = "${sha256}"; + }) {}; + pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = "${rev}"; + sha256 = "${sha256}"; + } + ''; } else { + git.ref = npkgs.rev; + }); } diff --git a/lass/krops.nix b/lass/krops.nix index 128c9ee04..fe5c00f3d 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -24,7 +24,7 @@ }; }; } - (if (lib.pathExists (./. + "/1systems/${name}/source.nix")) && (! test) then + (if lib.pathExists (./. + "/1systems/${name}/source.nix") then import (./. + "/1systems/${name}/source.nix") { inherit lib pkgs test; } else {} |