Create custom calamares plasma iso with extra packages

I can build a Nixos Plasma iso with these two files.

https://github.com/erikdubois/nixos-configurations/tree/main/build-calamares-plasma-iso

  1. script to run
    https://github.com/erikdubois/nixos-configurations/blob/1b250ccd347fa76911ec9e07922df85d4ecf5073/build-calamares-plasma-iso/create-calamares-plasma-iso#L6

  2. nix config

I just want a few packages not only on the live cd but also on the users system. Most importantly I am missing git. But I hear some users are missing wifi drivers.

environment.systemPackages = [ pkgs.yakuake pkgs.git pkgs.inxi pkgs.neofetch pkgs.sublime4 pkgs.meld ];

The packages I have added will be installed on the live cd but not on the future pc.

What can I add to ensure the packages are on the squashfs file?

Calamares generates a new NixOS configuration (code) and builds it inside the installation target, it doesn’t make a copy of the .iso filesystem like in other distributions.

You have to either override pkgs.calamares-nixos-extensions with your own fork or teach your users how to set up partitions and use nixos-install with a custom configuration (--system path/to/configuration.nix).