fix bordervm in hydra

This commit is contained in:
Daniel Barlow 2023-02-20 17:46:07 +00:00
parent cc67116845
commit 4f5b4924ff
3 changed files with 12 additions and 4 deletions

View file

@ -35,7 +35,6 @@ in {
}; };
imports = [ imports = [
<nixpkgs/nixos/modules/virtualisation/qemu-vm.nix> <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
./bordervm.conf.nix
]; ];
config = { config = {
boot.kernelParams = [ boot.kernelParams = [

6
ci.nix
View file

@ -6,12 +6,13 @@
let let
inherit (builtins) map; inherit (builtins) map;
pkgs = (import nixpkgs {}); pkgs = (import nixpkgs {});
borderVmConf = ./bordervm.conf-example.nix;
inherit (pkgs.lib.attrsets) genAttrs; inherit (pkgs.lib.attrsets) genAttrs;
devices = [ "qemu" "gl-ar750" "gl-mt300n-v2" "gl-mt300a" ]; devices = [ "qemu" "gl-ar750" "gl-mt300n-v2" "gl-mt300a" ];
vanilla = ./vanilla-configuration.nix; vanilla = ./vanilla-configuration.nix;
for-device = name: for-device = name:
(import liminix { (import liminix {
inherit nixpkgs; inherit nixpkgs borderVmConf;
device = import (liminix + "/devices/${name}"); device = import (liminix + "/devices/${name}");
liminix-config = vanilla; liminix-config = vanilla;
}).outputs.default; }).outputs.default;
@ -19,12 +20,13 @@ let
jobs = jobs =
(genAttrs devices (name: for-device name)) // tests // { (genAttrs devices (name: for-device name)) // tests // {
buildEnv = (import liminix { buildEnv = (import liminix {
inherit nixpkgs; inherit nixpkgs borderVmConf;
device = import (liminix + "/devices/qemu"); device = import (liminix + "/devices/qemu");
liminix-config = vanilla; liminix-config = vanilla;
}).buildEnv; }).buildEnv;
with-unstable = (import liminix { with-unstable = (import liminix {
nixpkgs = unstable; nixpkgs = unstable;
inherit borderVmConf;
device = import (liminix + "/devices/qemu"); device = import (liminix + "/devices/qemu");
liminix-config = vanilla; liminix-config = vanilla;
}).outputs.default; }).outputs.default;

View file

@ -2,13 +2,19 @@
device device
, liminix-config ? <liminix-config> , liminix-config ? <liminix-config>
, nixpkgs ? <nixpkgs> , nixpkgs ? <nixpkgs>
, borderVmConf ? ./bordervm.conf.nix
}: }:
let let
overlay = import ./overlay.nix; overlay = import ./overlay.nix;
pkgs = import nixpkgs (device.system // { pkgs = import nixpkgs (device.system // {
overlays = [overlay]; overlays = [overlay];
config = {allowUnsupportedSystem = true; }; config = {
allowUnsupportedSystem = true; # mipsel
permittedInsecurePackages = [
"python-2.7.18.6" # kernel backports needs python <3
];
};
}); });
config = (pkgs.lib.evalModules { config = (pkgs.lib.evalModules {
@ -28,6 +34,7 @@ let
modules = [ modules = [
({ ... } : { nixpkgs.overlays = [ overlay ]; }) ({ ... } : { nixpkgs.overlays = [ overlay ]; })
(import ./bordervm-configuration.nix) (import ./bordervm-configuration.nix)
borderVmConf
]; ];
}).config.system; }).config.system;
in { in {