diff options
| author | Mel <einebeere@gmail.com> | 2024-12-07 18:59:51 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-07 18:59:51 +0100 |
| commit | 934ab7978b824e1cd7a9e8d8284e9fc2cd325eb1 (patch) | |
| tree | 0b05c7d7f4dc4e992d9d08460c33801fdc374e15 /services/irc | |
| parent | d1a88ffa2c8cf5d6dd690f9059c0da059e01b716 (diff) | |
| download | network-934ab7978b824e1cd7a9e8d8284e9fc2cd325eb1.tar.zst network-934ab7978b824e1cd7a9e8d8284e9fc2cd325eb1.zip | |
Allow global and tailnet ports in foundation
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'services/irc')
| -rw-r--r-- | services/irc/soju.nix | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/services/irc/soju.nix b/services/irc/soju.nix index f6c7ff0..e5c55c1 100644 --- a/services/irc/soju.nix +++ b/services/irc/soju.nix @@ -4,8 +4,8 @@ let inherit (pkgs) dockerTools soju; inherit (auxiliaryPkgs) common; - ircPort = "6667"; - socketPort = "3030"; + ircPort = 6667; + socketPort = 3030; sojuDir = "/srv/soju"; sojuImage = dockerTools.streamLayeredImage { @@ -22,24 +22,20 @@ let in { - virtualisation.oci-containers.containers = { - soju = { - imageStream = sojuImage; - image = "soju:${soju.version}"; - # TODO: allow tailscale ports in foundation - ports = [ - "${me.tailscale.ip}:${ircPort}:${ircPort}" - "${me.tailscale.ip}:${socketPort}:${socketPort}" - ]; - - volumes = [ - "${sojuDir}/config.in:/etc/soju/config.in" - "${sojuDir}/soju.db:/var/lib/soju/soju.db" - "${sojuDir}/logs:/var/lib/soju/logs" - ]; - - entrypoint = "${soju}/bin/soju"; - cmd = [ "-config" "/etc/soju/config.in" ]; - }; + foundation.services.soju = { + image = sojuImage; + ports = [ + (common.tailnetPort me ircPort) + (common.tailnetPort me socketPort) + ]; + + volumes = [ + [ "${sojuDir}/config.in" "/etc/soju/config.in" ] + [ "${sojuDir}/soju.db" "/var/lib/soju/soju.db" ] + [ "${sojuDir}/logs" "/var/lib/soju/logs" ] + ]; + + entrypoint = "${soju}/bin/soju"; + cmd = [ "-config" "/etc/soju/config.in" ]; }; } |
