mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-07-14 19:40:42 +03:00
nixos-test: use evaluated kexec image
This commit is contained in:
parent
932cf2331b
commit
a13702601a
@ -4,8 +4,10 @@
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
inputs.disko.url = "github:nix-community/disko/master";
|
||||
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# used for testing
|
||||
inputs.nixos-images.url = "github:nix-community/nixos-images";
|
||||
|
||||
outputs = { self, disko, nixpkgs, ... }:
|
||||
outputs = { self, disko, nixpkgs, nixos-images, ... }:
|
||||
let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
@ -32,6 +34,7 @@
|
||||
from-nixos = import ./tests/from-nixos.nix {
|
||||
inherit pkgs;
|
||||
disko = disko.nixosModules.disko;
|
||||
kexec-installer = nixos-images.packages.${pkgs.system}.kexec-installer-nixos-unstable;
|
||||
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
|
||||
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
|
||||
};
|
||||
|
@ -2,12 +2,9 @@
|
||||
, makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
|
||||
, eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>
|
||||
, disko ? "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
|
||||
, kexec-installer
|
||||
, ... }:
|
||||
let
|
||||
kexec_tarball = builtins.fetchurl {
|
||||
url = "https://github.com/nix-community/nixos-images/releases/download/nixos-22.05/nixos-kexec-installer-x86_64-linux.tar.gz";
|
||||
sha256 = "sha256:1ff7rc0n8w1vab7k9sir3029sizfaq8yx7y8r1id94gcqrr2n1sd";
|
||||
};
|
||||
systemToInstall = { modulesPath, ... }: {
|
||||
imports = [
|
||||
disko
|
||||
@ -114,7 +111,7 @@ makeTest {
|
||||
ssh-add /etc/sshKey
|
||||
${../nixos-remote} \
|
||||
--no-ssh-copy-id \
|
||||
--kexec ${kexec_tarball} \
|
||||
--kexec ${kexec-installer}/nixos-kexec-installer-${pkgs.stdenv.hostPlatform.system}.tar.gz \
|
||||
--store-paths ${toString evaledSystem.config.system.build.disko} ${toString evaledSystem.config.system.build.toplevel} \
|
||||
root@installed >&2
|
||||
""")
|
||||
|
Loading…
Reference in New Issue
Block a user