diff --git a/ci.nix b/ci.nix index b3745e1f..2e40c1bf 100644 --- a/ci.nix +++ b/ci.nix @@ -1,11 +1,6 @@ -{ - nixpkgs, - unstable, - liminix, - ... -}: let - pkgs = (import nixpkgs { }); + pkgs = import { }; + liminix = ; borderVmConf = ./bordervm.conf-example.nix; inherit (pkgs.lib.attrsets) genAttrs; devices = [ @@ -21,7 +16,7 @@ let vanilla = ./vanilla-configuration.nix; for-device = name: (import liminix { - inherit nixpkgs borderVmConf; + inherit borderVmConf; device = import (liminix + "/devices/${name}"); liminix-config = vanilla; }).outputs.default; @@ -32,7 +27,7 @@ let // { buildEnv = (import liminix { - inherit nixpkgs borderVmConf; + inherit borderVmConf; device = import (liminix + "/devices/qemu"); liminix-config = vanilla; }).buildEnv; @@ -40,7 +35,7 @@ let let json = (import liminix { - inherit nixpkgs borderVmConf; + inherit borderVmConf; device = import (liminix + "/devices/qemu"); liminix-config = { ... }: @@ -74,11 +69,5 @@ let > $out/nix-support/hydra-build-products ''; }; - with-unstable = (import liminix { - nixpkgs = unstable; - inherit borderVmConf; - device = import (liminix + "/devices/qemu"); - liminix-config = vanilla; - }).outputs.default; }; -in jobs +in (genAttrs devices for-device) # tests # jobs diff --git a/default.nix b/default.nix index c61404b7..586ef47f 100644 --- a/default.nix +++ b/default.nix @@ -2,14 +2,13 @@ deviceName ? null, device ? (import ./devices/${deviceName}), liminix-config ? , - nixpkgs ? , borderVmConf ? ./bordervm.conf.nix, imageType ? "primary", }: let overlay = import ./overlay.nix; - pkgs = import nixpkgs ( + pkgs = import ( device.system // { overlays = [ overlay ]; diff --git a/tests/ext4/test.nix b/tests/ext4/test.nix index f9725836..972362ea 100644 --- a/tests/ext4/test.nix +++ b/tests/ext4/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: -let img = (import liminix { - device = import "${liminix}/devices/qemu/"; +let img = (import { + device = import ; liminix-config = ./configuration.nix; }).outputs.vmroot; pkgs = import { overlays = [(import ../../overlay.nix)]; }; diff --git a/tests/fennel/test.nix b/tests/fennel/test.nix index 47149e62..b52f56f6 100644 --- a/tests/fennel/test.nix +++ b/tests/fennel/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: let - overlay = import "${liminix}/overlay.nix"; + overlay = import ; pkgs = import { overlays = [overlay]; }; script = pkgs.writeFennel "foo" {} ./hello.fnl; inherit (pkgs.lua.pkgs) fifo; diff --git a/tests/inout/test.nix b/tests/inout/test.nix index 5f382e40..ba4b3c21 100644 --- a/tests/inout/test.nix +++ b/tests/inout/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: -let img = (import liminix { - device = import "${liminix}/devices/qemu/"; +let img = (import { + device = import ; liminix-config = ./configuration.nix; }).outputs.vmroot; pkgs = import { overlays = [(import ../../overlay.nix)]; }; diff --git a/tests/jffs2/test.nix b/tests/jffs2/test.nix index f9725836..972362ea 100644 --- a/tests/jffs2/test.nix +++ b/tests/jffs2/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: -let img = (import liminix { - device = import "${liminix}/devices/qemu/"; +let img = (import { + device = import ; liminix-config = ./configuration.nix; }).outputs.vmroot; pkgs = import { overlays = [(import ../../overlay.nix)]; }; diff --git a/tests/min-copy-closure/test.nix b/tests/min-copy-closure/test.nix index 14f0225d..cd53f280 100644 --- a/tests/min-copy-closure/test.nix +++ b/tests/min-copy-closure/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: -let lmx = (import liminix { - device = import "${liminix}/devices/qemu/"; +let lmx = (import { + device = import ; liminix-config = ./configuration.nix; }); rogue = lmx.pkgs.rogue; diff --git a/tests/pppoe/test.nix b/tests/pppoe/test.nix index c8007a90..8abe96dc 100644 --- a/tests/pppoe/test.nix +++ b/tests/pppoe/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: -let img = (import liminix { - device = import "${liminix}/devices/qemu"; +let img = (import { + device = import ; liminix-config = ./configuration.nix; }).outputs.default; pkgs = import { overlays = [(import ../../overlay.nix)]; }; diff --git a/tests/pseudofiles/test.nix b/tests/pseudofiles/test.nix index 8d68a31a..14df22e0 100755 --- a/tests/pseudofiles/test.nix +++ b/tests/pseudofiles/test.nix @@ -1,13 +1,9 @@ -{ - liminix -, nixpkgs -}: let - overlay = import "${liminix}/overlay.nix"; + overlay = import ; nixpkgs = import { overlays = [overlay]; }; fixture = nixpkgs.callPackage ./fixture.nix {}; in nixpkgs.runCommand "check" { - nativeBuildInputs = with nixpkgs; [ squashfsTools qprint ] ; + nativeBuildInputs = with ; [ squashfsTools qprint ] ; } '' set -e diff ${fixture} ${./result.expected} diff --git a/tests/smoke/test.nix b/tests/smoke/test.nix index 25a81c7b..53563f32 100644 --- a/tests/smoke/test.nix +++ b/tests/smoke/test.nix @@ -1,10 +1,6 @@ -{ - liminix -, nixpkgs -}: -let img = (import liminix { - device = import "${liminix}/devices/qemu/"; - liminix-config = "${liminix}/vanilla-configuration.nix"; +let img = (import { + device = import ; + liminix-config = ; }).outputs.rootfs; pkgs = import {}; in pkgs.runCommand "check" { diff --git a/tests/tftpboot/test.nix b/tests/tftpboot/test.nix index 618abec4..9906824b 100644 --- a/tests/tftpboot/test.nix +++ b/tests/tftpboot/test.nix @@ -1,9 +1,6 @@ -{ - liminix -}: let check = deviceName : config : -let derivation = (import liminix { - device = import "${liminix}/devices/${deviceName}/"; +let derivation = (import { + device = import ( + "/${deviceName}"); liminix-config = { ... } : { imports = [./configuration.nix]; inherit config; diff --git a/tests/updown/test.nix b/tests/updown/test.nix index 589e3838..80525a4a 100644 --- a/tests/updown/test.nix +++ b/tests/updown/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: -let img = (import liminix { - device = import "${liminix}/devices/qemu/"; +let img = (import { + device = import ; liminix-config = ./configuration.nix; }).outputs.vmroot; pkgs = import { overlays = [(import ../../overlay.nix)]; }; diff --git a/tests/wlan/test.nix b/tests/wlan/test.nix index fcc27157..a4dbc8e6 100644 --- a/tests/wlan/test.nix +++ b/tests/wlan/test.nix @@ -1,9 +1,5 @@ -{ - liminix -, nixpkgs -}: -let img = (import liminix { - device = import "${liminix}/devices/qemu-armv7l/"; +let img = (import { + device = import ; liminix-config = ./configuration.nix; }).outputs.default; pkgs = import { overlays = [(import ../../overlay.nix)]; };