fix: use vmix's own locked nixpkgs for all image building
The NixOS module was importing lib directly with the host's pkgs, causing image customization to use the host's guestfs-tools instead of vmix's locked version. guestfs-tools 1.52.2 (from host nixpkgs) has a bug that overwrites /boot/grub/grub.cfg with resolv.conf content, breaking VM boot. Now vmixLib is built once in flake.nix with vmix's own nixpkgs and passed through the overlay to pkgs.vmixLib. Removes overlay.nix and module.nix as the logic is inlined in flake.nix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
55697e5d89
commit
192ea9b54d
4 changed files with 7 additions and 19 deletions
|
|
@ -15,9 +15,12 @@
|
|||
lib = pkgs.lib;
|
||||
vmixLib = import ./lib { inherit pkgs lib system; };
|
||||
in {
|
||||
overlays.default = import ./overlay.nix;
|
||||
overlays.default = final: prev: { inherit vmixLib; };
|
||||
|
||||
nixosModules.default = import ./module.nix;
|
||||
nixosModules.default = { config, pkgs, lib, ... }: {
|
||||
imports = [ ./nixos/default.nix ];
|
||||
config.nixpkgs.overlays = [ self.overlays.default ];
|
||||
};
|
||||
|
||||
lib.${system} = vmixLib;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./nixos/default.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
vmixLib = import ./../lib {inherit pkgs lib; };
|
||||
vmixLib = pkgs.vmixLib;
|
||||
args = { inherit config pkgs lib vmixLib; };
|
||||
in
|
||||
{
|
||||
|
|
@ -15,6 +15,4 @@ in
|
|||
(types.submodule (import ./namespaceSubmoduleOptions.nix args));
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.nixpkgs.overlays = [ (import ../overlay.nix) ];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
final: prev:
|
||||
let
|
||||
# Pin vmixLib to nixpkgs 25-11 so all VM images are built with a consistent toolchain
|
||||
vmixPkgs = prev.v25-11 or prev;
|
||||
in {
|
||||
vmixLib = vmixPkgs.callPackage ./lib {};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue