... as we update flake.lock to a nixpkgs rev that includes that PR.
"nodes": {
"nixpkgs": {
"locked": {
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1686960236,
- "narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=",
+ "lastModified": 1689850295,
+ "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=",
"owner": "NixOS",
"repo": "nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "04af42f3b31dba0ef742d254456dc4c14eedac86",
+ "rev": "5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0",
"type": "github"
},
"original": {
"type": "github"
},
"original": {
{ config, lib, modulesPath, pkgs, ... }:
let
inherit (lib)
{ config, lib, modulesPath, pkgs, ... }:
let
inherit (lib)
- escapeShellArg findSingle mkForce mkIf mkMerge mkOption mkVMOverride
- optional;
+ escapeShellArg mkForce mkIf mkMerge mkOption mkVMOverride optional;
cfg = config.virtualisation.qemu.isolation;
cfg = config.virtualisation.qemu.isolation;
- lookupDriveDeviceName = driveName: driveList:
- (findSingle (drive: drive.name == driveName)
- (throw "Drive ${driveName} not found")
- (throw "Multiple drives named ${driveName}") driveList).device;
-
storeMountPath = if config.virtualisation.writableStore then
"/nix/.ro-store"
else
storeMountPath = if config.virtualisation.writableStore then
"/nix/.ro-store"
else
fileSystems = mkVMOverride {
"${storeMountPath}" = {
fileSystems = mkVMOverride {
"${storeMountPath}" = {
- device =
- lookupDriveDeviceName "nixstore" config.virtualisation.qemu.drives;
fsType = cfg.nixStoreFilesystemType;
options = [ "ro" ];
neededForBoot = true;
fsType = cfg.nixStoreFilesystemType;
options = [ "ro" ];
neededForBoot = true;
sharedDirectories = mkForce { };
qemu.drives = [{
sharedDirectories = mkForce { };
qemu.drives = [{
file = "${config.system.build.nixStoreImage}/nixos.img";
driveExtraOpts = {
format = "raw";
file = "${config.system.build.nixStoreImage}/nixos.img";
driveExtraOpts = {
format = "raw";