mirror of
https://github.com/SuperSandro2000/nixos-modules.git
synced 2024-06-11 10:44:10 +02:00
portunus: only open port when service is enabled
This commit is contained in:
parent
2fa64e5ee1
commit
cd89d3b937
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
let
|
||||
cfg = config.services.portunus;
|
||||
in
|
||||
{
|
||||
|
@ -24,9 +24,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.portunus.addToHosts {
|
||||
networking.hosts = {
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking.hosts = lib.mkIf cfg.addToHosts {
|
||||
${cfg.externalIp4} = [ cfg.domain ];
|
||||
${cfg.externalIp6} = [ cfg.domain ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user