proxmox-nixos icon indicating copy to clipboard operation
proxmox-nixos copied to clipboard

virtualisation.proxmox.iso is constantly erroring (on every option)

Open SpiderUnderUrBed opened this issue 3 months ago • 2 comments

[spiderunderurbed@daspidercave:~/nixnuc/nixmoxer]$ nix run ~/projects/proxmox-nixos/#nixmoxer -- --flake myvm
warning: ignoring untrusted substituter 'https://cache.saumon.network/proxmox-nixos', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
2025-08-07 22:03:35,646 - INFO - Loading configuration from /home/spiderunderurbed/nixnuc/nixmoxer/nixmoxer.conf...
2025-08-07 22:03:35,646 - INFO - Configuration parsed successfully.
2025-08-07 22:03:35,647 - INFO - Authenticating with password...
2025-08-07 22:03:35,800 - INFO - Authentication successful.
2025-08-07 22:03:35,802 - INFO - Evaluating configuration...
2025-08-07 22:03:59,135 - ERROR - Machine evaluation failed:
2025-08-07 22:03:59,138 - ERROR - warning: Git tree '/home/spiderunderurbed/nixnuc/nixmoxer' is dirty
error:
       … while evaluating attribute 'iso'

       … while evaluating the attribute 'value'
         at /nix/store/a40gkgcry8a1s9gjr2z52f02gn0808bl-source/lib/modules.nix:1085:7:
         1084|     // {
         1085|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1086|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `virtualisation.proxmox.iso':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: A definition for option `virtualisation.proxmox.iso' is not of type `package'. Definition values:
       - In `/nix/store/a40gkgcry8a1s9gjr2z52f02gn0808bl-source/flake.nix': null

[ble: exit 1][ble: elapsed 24.966s (CPU 43.5%)] nix run ~/projects/proxmox-nixos/#nixmoxer -- --flake myvm

By the way ~/projects/proxmox-nixos/ is this project freshly cloned, I just have it there for other reasons (like if i need to test changes), but this is the latest version of this repo.

I tried not setting iso, I also tried: iso = "../nixos-minimal.iso"; and:

iso = pkgs.runCommand "custom-iso" {
  src = ../nixos-minimal.iso;
} ''
  mkdir -p $out
  cp $src $out/
'';

which once worked

Full config:

{ config, lib, pkgs, ... }:

{
  networking.hostName = "myvm";

  virtualisation.proxmox = {
    node = "hostnuc";

    #iso = "../nixos-minimal.iso";
iso = pkgs.runCommand "custom-iso" {
  src = ../nixos-minimal.iso;
} ''
  mkdir -p $out
  cp $src $out/
'';


    vmid = 100;
    memory = 12288;
    cores = 3;
    sockets = 1;

    boot.order = [ "scsi0" ];

    net = [
      {
        model = "virtio";
        bridge = "vmbr0";
      }
    ];

    scsi = [
      {
        file = "local:0,format=qcow2,import-from=/home/spiderunderurbed/hdd/vms/vm-2/nixos.qcow2";
        # size = "20G";  # Optional: only needed if creating disk from scratch
        # format = "none";  # Optional if already qcow2
      }
    ];
  };


  # Optional: uncomment to force image base name
  # image.baseName = lib.mkForce "nixos-custom";
}

My flake if it has any relevence: https://pastebin.com/dXJYTUNx

SpiderUnderUrBed avatar Aug 07 '25 10:08 SpiderUnderUrBed