I have a firewall definition in my Nixos configuration.nix. I also declared ports in the Zammad pkg.
services.zammad = {
port = 8000;
}
For my networking, instead of declaring the value again, like this
networking.firewall.allowedTCPPorts = [ 7944 2595 ];
I would like to do something like
networking.firewall.allowedTCPPorts = [ 7944 options.services.zammad.port ];
When I tried the above it failed with
error: A definition for option `networking.firewall.allowedTCPPorts."│ # networking.firewall.allowedUDPPorts = [ ... ];
[definition 1-entry 2]"' is not of type `16 bit unsigned integer; between 0 │ # Or disable the firewall altogether.
and 65535 (both inclusive)'. Definition values: │ # networking.firewall.enable = false;
- In `/etc/nixos/configuration.nix': │
{ │ # This value determines the NixOS release from which the default
__toString = <function>; │ # settings for stateful data, like file locations and database versions
_type = "option"; │ # on your system were taken. It‘s perfectly fine and recommended to lea
declarationPositions = [ │ve
{ │ # this value at the release version of the first install of this system
...
In MyNixOS it says that services.zammard.port is a 16 bit unsigned integer. So, I’m not sure what the issue is.