Calamares installer don't start on "custom" ISO

Hi,

I discovered NixOS a few days ago, so sorry about perhaps the newbee question.

I am trying to create a “custom” ISO with the calamares installer. The goal is to allow a graphical installation of NixOS.

I followed the tutorial here : https://nixos.wiki/wiki/Creating_a_NixOS_live_CD. I created the flak.nix file :

{
  description = "Minimal NixOS installation media";
  inputs.nixos.url = "nixpkgs/23.11-beta";
  outputs = { self, nixos }: {
    nixosConfigurations = {
      exampleIso = nixos.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          "${nixos}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix"
          ({ pkgs, ... }: {
            environment.systemPackages = [ pkgs.neovim ];
          })
        ];
      };
    };
  };
}

From the turorial I just replaced the installation-cd-graphical-calamares-gnome.nix part.

I generated the ISO file with the following command (same as tutorial):

nix build .#nixosConfigurations.exampleIso.config.system.build.isoImage

The launched the ISO with

qemu-system-x86_64 -enable-kvm -smp 8 -m 4096 -cdrom result/iso/nixos-23.11.20231121.dc7b3fe-x86_64-linux.iso

It ends up to a kernel panic like this :

What have I made wrong?

Thanks for the help

Try this instead: inputs.nixos.url = "github:NixOS/nixpkgs/nixos-23.11";
Also, 23.11 is obsolete, please use 24.05 instead. I’ve updated the flake example on the wiki.

Many thanks it was that, not working like a charm!

But one question to understand what was going one: ok if the 23-11 version is no more maintained, but wasn’t it in the NixOS value to be able to build again something that worked by the past? I ask just to understand and learn about potential pitfall :wink:

Also an other question: when i change from installation-cd-graphical-calamares-gnome.nix to installation-cd-graphical-calamares-gnome.nix it don’t update the ISO. How to clean before regenerating?

I tried with nix flake update but no effect

It’s not updated anymore, so no security fixes. The example provided broken branch, the nixos-23.11 branch should work fine.

It’s the same file though?

You don’t need to clean anything. If the input is the same, the output will be too.

1 Like

Just because you can build something doesn’t mean you can deploy it and expect that it works on any system. A common misconception about what reproducibility means wrt NixOS.

Side note: the wiki you linked might not get updated anymore since most people now work on https://wiki.nixos.org/