···1111 # mkNixosSystem wraps mkSystem (or lib.nixosSystem) with flake-parts' withSystem to give us inputs' and self' from flake-parts
1212 # which can also be used as a template for nixos hosts with system type and modules to be imported with ease
1313 # specialArgs is also defined here to avoid defining them for each host
1414- mkNixosSystem = {
1414+ mkNixosSystem = host: {
1515 modules,
1616 system,
1717 withSystem,
···2323 ...
2424 }:
2525 mkSystem {
2626- inherit modules system;
2626+ inherit system;
2727+ modules =
2828+ [
2929+ "${self}/hosts/${host}"
3030+ {config.modules.system.hostname = host;}
3131+ ]
3232+ ++ args.modules or [];
2733 specialArgs = {inherit lib inputs self inputs' self';} // args.specialArgs or {};
2834 });
29353036 # mkIso is should be a set that extends mkSystem (again) with necessary modules to create an Iso image
3137 # don't use mkNixosSystem as it is complelty overkill for an iso and will have too much data, we need a light weight image
3232- mkNixosIso = {
3333- modules,
3434- system,
3535- ...
3636- } @ args:
3838+ mkNixosIso = host: {system, ...} @ args:
3739 mkSystem {
3840 inherit system;
3941 specialArgs = {inherit inputs lib self;} // args.specialArgs or {};
···4244 # get an installer profile from nixpkgs to base the Isos off of
4345 "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
4446 "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
4747+ "${self}/hosts/${host}"
4548 ]
4649 ++ args.modules or [];
4750 };