diff options
| author | Fuwn <[email protected]> | 2024-10-07 21:17:05 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-07 21:17:05 -0700 |
| commit | 758589cd9171246d7f397acb37f906eceb4c4e75 (patch) | |
| tree | 7da0b95ac925daf9a16c111f1a486455f464f061 /modules/server/virtualisation/containers/gigi.nix | |
| parent | containers: move caddy virtual hosts to container files (diff) | |
| download | nixos-config-758589cd9171246d7f397acb37f906eceb4c4e75.tar.xz nixos-config-758589cd9171246d7f397acb37f906eceb4c4e75.zip | |
containers: move port to variable
Diffstat (limited to 'modules/server/virtualisation/containers/gigi.nix')
| -rw-r--r-- | modules/server/virtualisation/containers/gigi.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/server/virtualisation/containers/gigi.nix b/modules/server/virtualisation/containers/gigi.nix index 25f5458..4f9dd95 100644 --- a/modules/server/virtualisation/containers/gigi.nix +++ b/modules/server/virtualisation/containers/gigi.nix @@ -1,13 +1,23 @@ { config, ... }: +let + port = 79; +in { - networking.firewall.allowedTCPPorts = [ 79 ]; + networking.firewall.allowedTCPPorts = [ + port + ]; virtualisation.oci-containers.containers.gigi = { inherit (config.modules.containers) extraOptions; image = "fuwn/gigi"; autoStart = true; - ports = [ "79:79" ]; volumes = [ "/mnt/docker/gigi:/gigi/.gigi" ]; + + ports = + let + portString = builtins.toString port; + in + [ "${portString}:${portString}" ]; }; } |