Is your feature request related to a problem? Please describe.
Right now one has to explicitly define system in flake outputs.
The nix flake itself already comes with boiler code like this:
outputs = { self } : let
# ...
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
{
defaultPackage = forAllSystems (system: self.packages.${system}.nix);;
};
I think having to use that much code hurts portability of the ecosystem because people
will only specify the minimum and there seems no easy way of overriding it without changing the
flake itself.
Describe the solution you'd like
outputs = { self, system } : {
defaultPackage.${system} = self.packages.${system};
};
Describe alternatives you've considered
Use boilercode in every project or rely on external libraries like https://github.com/numtide/flake-utils
If someone needs to explicitly specify platforms i.e. to build packages for different architectures with hydra this should be still possible.
Is your feature request related to a problem? Please describe.
Right now one has to explicitly define system in flake outputs.
The nix flake itself already comes with boiler code like this:
I think having to use that much code hurts portability of the ecosystem because people
will only specify the minimum and there seems no easy way of overriding it without changing the
flake itself.
Describe the solution you'd like
Describe alternatives you've considered
Use boilercode in every project or rely on external libraries like https://github.com/numtide/flake-utils
If someone needs to explicitly specify platforms i.e. to build packages for different architectures with hydra this should be still possible.