Skip to content

Expose installer as a module#353

Merged
yuyuyureka merged 2 commits into
nix-community:mainfrom
n8henrie:expose-installer
Jan 15, 2026
Merged

Expose installer as a module#353
yuyuyureka merged 2 commits into
nix-community:mainfrom
n8henrie:expose-installer

Conversation

@n8henrie
Copy link
Copy Markdown
Contributor

It would be nice to expose the iso-configuration to flake outputs, which will make it significantly easier for end users to create their own customized installer images.

For example, in my case I have been greatly enjoying Asahi NixOS on ZFS root, and so having ZFS support in the installer makes things much easier!
With this PR, users like myself can easily create their own installer image with ZFS support (and git, for flakes and rsync), like so:

packages.x86_64-linux.zfs-installer =
    (nixpkgs.lib.nixosSystem {
      inherit system;
      pkgs = import nixpkgs {
        crossSystem.system = "aarch64-linux";
        localSystem.system = system;
        overlays = [ nixos-silicon.overlays.default ];
      };
      modules = [
        nixos-silicon.outputs.nixosModules.apple-silicon-installer
        { hardware.asahi.pkgsSystem = system; }
        (
          { pkgs, ... }:
          {
            boot.supportedFilesystems.zfs = true;
            networking.hostId = "AAAAAAAA";
            environment.systemPackages = with pkgs; [
              git
              rsync
            ];
          }
        )
      ];
    }).config.system.build.isoImage;

There may be a way to use some overrides with the existing installer-bootstrap output, but if so, I haven't yet figured it out: https://discourse.nixos.org/t/custom-asahi-installer

@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/custom-asahi-installer/69034/6

@yuyuyureka yuyuyureka force-pushed the main branch 2 times, most recently from ac90e4a to 417278f Compare September 28, 2025 09:26
@mio-19
Copy link
Copy Markdown

mio-19 commented Nov 26, 2025

This is very helpful!

It has merge conflicts

@n8henrie
Copy link
Copy Markdown
Contributor Author

Merge conflict was super minor, resolved.

@flokli
Copy link
Copy Markdown
Member

flokli commented Jan 15, 2026

Not meant to be blocking, but can you create a followup PR describing how to build your own installers? That'd be particularly useful if someone for example wants to enable ZFS (c.f. #363).

@yuyuyureka yuyuyureka merged commit 2bc25c3 into nix-community:main Jan 15, 2026
2 checks passed
@yuyuyureka yuyuyureka mentioned this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants