diff --git a/nixos/server/package-configs/cinny/default.nix b/nixos/server/package-configs/cinny/default.nix new file mode 100644 index 0000000..5f7d160 --- /dev/null +++ b/nixos/server/package-configs/cinny/default.nix @@ -0,0 +1,31 @@ +{ + config, + pkgs, + inputs, + lib, + ... +}: let + port = 2143; +in { + virtualisation.oci-containers.containers."cinny" = { + autoStart = true; + ports = ["${toString port}:80"]; + image = "cinny:latest"; + }; + + services.nginx = { + enable = true; + virtualHosts = { + "cinny.gladtherescake.eu" = { + ## Force HTTP redirect to HTTPS + forceSSL = true; + ## LetsEncrypt + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:${toString port}"; + proxyWebsockets = true; + }; + }; + }; + }; +} diff --git a/nixos/server/package-configs/default.nix b/nixos/server/package-configs/default.nix index ff7d535..4263264 100644 --- a/nixos/server/package-configs/default.nix +++ b/nixos/server/package-configs/default.nix @@ -16,5 +16,6 @@ ./roundcube ./coturn ./dashboard + ./cinny ]; }