diff options
-rw-r--r-- | configuration.nix | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/configuration.nix b/configuration.nix index e51cefd..a47d7db 100644 --- a/configuration.nix +++ b/configuration.nix @@ -122,12 +122,11 @@ in { wantedBy = [ "sockets.target" ]; restartTriggers = [ cfg.bind cfg.port ]; - + listenStreams = lib.mkMerge [ + [ (lib.mkIf (cfg.bind == null) (builtins.toString cfg.port)) ] + [ (lib.mkIf (cfg.bind != null) "${cfg.bind}:${builtins.toString cfg.port}") ] + ]; socketConfig = { - ListenStream = lib.mkMerge [ - (lib.mkIf (cfg.bind == null) cfg.port) - (lib.mkIf (cfg.bind != null) "${cfg.bind}:${builtins.toString cfg.port}") - ]; BindIPv6Only = true; }; }; |