Skip to content

Commit

Permalink
Switch to NixPkgs 24.05, eliminate separate OVMF NixPkgs input
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyYakeley committed Sep 29, 2024
1 parent 770edc5 commit 1d5c17c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 42 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [UNRELEASED]

* Switch to NixPkgs 24.05, eliminate separate OVMF NixPkgs input
* Modules:
* Improve change detection for domain restarts.
* Add per-object "restart" option to control restarts.
Expand Down
7 changes: 2 additions & 5 deletions checks/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ let
writeTextFile = stuff.packages.writeTextFile;
runCommand = name: args: script: "BUILD " + name;
qemu = "QEMU_PATH";
};
packages-ovmf =
{
OVMFFull.fd = "OVMFFull_FD_PATH";
};
};
Expand Down Expand Up @@ -47,8 +44,8 @@ in
ovmf-secboot =
stuff.packages.runCommand "ovmf-secboot" { }
''
test -f ${stuff.packages-ovmf.OVMFFull.fd}/FV/OVMF_CODE.ms.fd
test -f ${stuff.packages-ovmf.OVMFFull.fd}/FV/OVMF_VARS.ms.fd
test -f ${stuff.packages.OVMFFull.fd}/FV/OVMF_CODE.ms.fd
test -f ${stuff.packages.OVMFFull.fd}/FV/OVMF_VARS.ms.fd
echo "pass" > $out
'';
}
27 changes: 5 additions & 22 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 3 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,13 @@
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-23.11";
};

nixpkgs-ovmf =
{
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
ref = "nixos-24.05";
};
};

outputs = { self, nixpkgs, nixpkgs-ovmf }:
outputs = { self, nixpkgs }:
let
packages = import nixpkgs { system = "x86_64-linux"; };
packages-ovmf = import nixpkgs-ovmf { system = "x86_64-linux"; };

nixvirtPythonModulePackage = packages.runCommand "nixvirtPythonModulePackage" { }
''
Expand Down Expand Up @@ -52,7 +43,7 @@

modules = import ./modules.nix { inherit packages moduleHelperFile; };

stuff = { inherit packages packages-ovmf; };
stuff = { inherit packages; };
in
{
lib = mklib stuff;
Expand Down
6 changes: 3 additions & 3 deletions templates/domain/windows.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://www.microsoft.com/en-us/windows/windows-11-specifications
# https://sysguides.com/install-a-windows-11-virtual-machine-on-kvm
stuff@{ packages, packages-ovmf, guest-install, ... }:
stuff@{ packages, guest-install, ... }:
{ name
, uuid
, memory ? { count = 4; unit = "GiB"; }
Expand Down Expand Up @@ -29,11 +29,11 @@ base //
{
readonly = true;
type = "pflash";
path = "${packages-ovmf.OVMFFull.fd}/FV/OVMF_CODE.ms.fd";
path = "${packages.OVMFFull.fd}/FV/OVMF_CODE.ms.fd";
};
nvram =
{
template = "${packages-ovmf.OVMFFull.fd}/FV/OVMF_VARS.ms.fd";
template = "${packages.OVMFFull.fd}/FV/OVMF_VARS.ms.fd";
path = nvram_path;
};
};
Expand Down

0 comments on commit 1d5c17c

Please sign in to comment.