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

[Feature Request] expose the target format as string to the configuration

Open wucke13 opened this issue 1 year ago • 1 comments

This would allow for things like

{ nixosGenerateFormat, ... }:
{
 # ....
} // (if (nixosGenerateFormat == "vm") then {virtualisation.forwardPorts = [ 
    {from = "host"; host.port = 20021; guest.port = 22; }
    {from = "host"; host.port = 20079; guest.port = 80; }
    {from = "host"; host.port = 7124; guest.port = 7125; }
  ]; } else {})

wucke13 avatar Jul 24 '22 12:07 wucke13

You should follow @DavHau's work on #256. When that merges, that will allow a better solution to this use case by using the formatConfigs options.

mayl avatar Jul 04 '23 22:07 mayl