nixos-generators
nixos-generators copied to clipboard
Format gets ignored in flake
I've this setup:
installer = (lib.makeOverridable lib.nixosSystem) {
inherit pkgs;
specialArgs = { inherit inputs; };
modules = [
./system/installer/configuration.nix
];
format = "iso";
};
I've to run nix run github:nix-community/nixos-generators -- --flake .#installer -f iso
and also provide -f
, as it complains about not having a specified format.
If you use a flake, you can also use nixos-generators.nixosGenerate
as shown here: https://github.com/Mic92/dotfiles/blob/master/nixos/images/default.nix#L47
installer = nixos-generators.nixosGenerate {
inherit pkgs;
specialArgs = { inherit inputs self; };
modules = [
./system/installer/configuration.nix
agenix.nixosModules.age
];
format = "iso";
};
Still the same problem.
Do you have a minimal flake to reproduce this? I can use nixosGenerate
from my dotfiles: nix build github:mic92/dotfiles#packages.x86_64-linux.sd-image