diff options
author | Vika <vika@fireburn.ru> | 2023-07-22 19:24:20 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-07-22 19:29:48 +0300 |
commit | 5b0f56d6557df71c1da7e9ab6feaeda791d0183d (patch) | |
tree | 3b86629bd9008fbae57b35b59d1618a2e20b56e7 | |
parent | 35a5679b98324a63b0902f633148c1143fbd166a (diff) | |
download | kittybox-5b0f56d6557df71c1da7e9ab6feaeda791d0183d.tar.zst |
configuration.nix: use NixOS option for ListenStream
-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; }; }; |