-
-
Notifications
You must be signed in to change notification settings - Fork 290
Description
I am writing a small installer for a production deployment. There are a variety of machines in use, and therefore we need to be able to switch between aarch64-linux and x86_64-linux. Because of this we have the configuration: #my-machine.x86_64-linux and #my-machine.aarch64-linux.
Whilst setting up the disko config for offline installs (following https://github.com/nix-community/disko/blob/master/docs/disko-install.md#example-for-a-nixos-installer), I was getting an error saying that extendModules does not exist on this line:
Line 46 in 42affa9
| installSystem = originalSystem.extendModules { |
This ended up being because the command that I was using was exec ${pkgs.disko}/bin/disko-install --flake "${self}#my-machine" which references the config as an attribute set.
My solution was to flatten out my configuration as such:
my-machine-x86_64-linux = mkConfig "x86_64-linux";
my-machine-aarch64-linux = mkConfig "aarch64-linux";and modify the command to:
exec ${pkgs.disko}/bin/disko-install --flake "${self}#my-machine-${pkgs.system}"Perhaps I am missing something obvious, but I think that the documentation is not very specific in this regard.
Am I missing something obvious, or could we just improve the documentation a bit? Would be happy to make a PR if documentation is the way to go.