nixos-generators icon indicating copy to clipboard operation
nixos-generators copied to clipboard

Format gets ignored in flake

Open gregistech opened this issue 2 years ago • 3 comments

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.

gregistech avatar Jul 03 '22 08:07 gregistech

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

Mic92 avatar Jul 04 '22 12:07 Mic92

      installer = nixos-generators.nixosGenerate {
        inherit pkgs;
        specialArgs = { inherit inputs self; };
        modules = [
          ./system/installer/configuration.nix
          agenix.nixosModules.age
        ];
        format = "iso";
      };

Still the same problem.

gregistech avatar Jul 06 '22 10:07 gregistech

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

Mic92 avatar Jul 06 '22 11:07 Mic92