From d9f2d942b236fbcce034ae6b62427688d547b846 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Thu, 3 Jul 2025 17:34:10 +0200 Subject: [PATCH] resolve regressions from recent qemu files - move import to match module classes - manually import sources to resolve infinite recursion --- infra/common/proxmox-qemu-vm.nix | 10 +++++++--- infra/flake-part.nix | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/infra/common/proxmox-qemu-vm.nix b/infra/common/proxmox-qemu-vm.nix index b100a6d5..7ce22dbf 100644 --- a/infra/common/proxmox-qemu-vm.nix +++ b/infra/common/proxmox-qemu-vm.nix @@ -1,9 +1,13 @@ -{ modulesPath, ... }: - +let + # pulling this in manually over from module args resolves an infinite recursion + sources = import ../../npins; +in { _class = "nixos"; - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + imports = [ + "${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + ]; boot = { initrd = { diff --git a/infra/flake-part.nix b/infra/flake-part.nix index 9d2b246a..4ad559bc 100644 --- a/infra/flake-part.nix +++ b/infra/flake-part.nix @@ -33,6 +33,10 @@ let ; }; + nixos.module.imports = [ + ./common/proxmox-qemu-vm.nix + ]; + imports = [ ./common/resource.nix @@ -40,7 +44,6 @@ let ++ ( if isTestVm then [ - ./common/proxmox-qemu-vm.nix ../machines/operator/${vmName} { nixos.module.users.users.root.openssh.authorizedKeys.keys = [