nixos-generators
nixos-generators copied to clipboard
[Feature Request] expose the target format as string to the configuration
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 {})
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.