commit 43fd9112aff40f45c4c203ac3a6b83ff9f4f8769
parent 482b60eb9136c144fa372e21147f8fc44c5c580a
Author: Daniel Barlow <dan@telent.net>
Date: Tue, 5 May 2026 14:25:43 +0100
Merge remote-tracking branch 'pcc/fix1'
Diffstat:
5 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/bordervm-configuration.nix b/bordervm-configuration.nix
@@ -1,3 +1,4 @@
+nixpkgs:
{
config,
pkgs,
@@ -65,7 +66,7 @@ in
};
};
imports = [
- <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
+ "${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
];
config = {
boot.kernelParams = [ "loglevel=9" ];
diff --git a/default.nix b/default.nix
@@ -2,15 +2,18 @@
deviceName ? null,
device ? (import ./devices/${deviceName}),
liminix-config ? <liminix-config>,
+ nixpkgs ? <nixpkgs>,
+ system ? builtins.currentSystem,
borderVmConf ? ./bordervm.conf.nix,
imageType ? "primary",
}:
let
- overlay = import ./overlay.nix;
- pkgs = import <nixpkgs> (
+ overlay = import ./overlay.nix nixpkgs;
+ pkgs = import nixpkgs (
device.system
// {
+ inherit system;
overlays = [ overlay ];
config = {
allowUnsupportedSystem = true; # mipsel
@@ -53,8 +56,8 @@ let
config = eval.config;
borderVm =
- ((import <nixpkgs/nixos/lib/eval-config.nix>) {
- system = builtins.currentSystem;
+ ((import "${nixpkgs}/nixos/lib/eval-config.nix") {
+ inherit system;
modules = [
{
nixpkgs.overlays = [
@@ -64,7 +67,7 @@ let
})
];
}
- (import ./bordervm-configuration.nix)
+ (import ./bordervm-configuration.nix nixpkgs)
borderVmConf
];
}).config.system;
@@ -72,6 +75,7 @@ in
{
outputs = config.system.outputs // {
default = config.system.outputs.${config.hardware.defaultOutput};
+ borderVm = borderVm.build.vm;
optionsJson =
let
o = import ./doc/extract-options.nix {
diff --git a/overlay.nix b/overlay.nix
@@ -1,9 +1,10 @@
-final: prev:
+nixpkgs: final: prev:
let
isCross = final.stdenv.buildPlatform != final.stdenv.hostPlatform;
crossOnly = pkg: amendFn: if isCross then (amendFn pkg) else pkg;
extraPkgs = import ./pkgs/default.nix {
inherit (final) lib callPackage;
+ inherit nixpkgs;
};
inherit (final) fetchpatch lib;
luaHost =
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -1,4 +1,4 @@
-{ callPackage, lib }:
+{ callPackage, lib, nixpkgs }:
let
typeChecked =
caller: type: value:
@@ -17,7 +17,9 @@ in
{
liminix = {
builders = {
- squashfs = callPackage ./liminix-tools/builders/squashfs.nix { };
+ squashfs = callPackage ./liminix-tools/builders/squashfs.nix {
+ inherit nixpkgs;
+ };
dtb = callPackage ./kernel/dtb.nix { };
uimage = callPackage ./kernel/uimage.nix { };
kernel = callPackage ./kernel { };
diff --git a/pkgs/liminix-tools/builders/squashfs.nix b/pkgs/liminix-tools/builders/squashfs.nix
@@ -1,6 +1,7 @@
{
buildPackages,
callPackage,
+ nixpkgs,
pseudofile,
runCommand,
writeText,
@@ -9,7 +10,7 @@ filesystem:
let
pseudofiles = pseudofile.write "files.pf" filesystem;
- storefs = callPackage <nixpkgs/nixos/lib/make-squashfs.nix> {
+ storefs = callPackage "${nixpkgs}/nixos/lib/make-squashfs.nix" {
# 1) Every required package is referenced from somewhere
# outside /nix/store. 2) Every file outside the store is
# specified by config.filesystem. 3) Therefore, closing over