NixOS-Config/nixos/server/package-configs/cinny/default.nix
2024-04-01 18:15:08 +02:00

36 lines
706 B
Nix

{
config,
pkgs,
inputs,
lib,
...
}: let
port = 2143;
in {
#TODO: set default server and disable changing that
virtualisation.oci-containers.containers."cinny" = {
autoStart = true;
ports = ["${toString port}:80"];
volumes = [
"./config.json:/app/config.json"
];
image = "ajbura/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;
};
};
};
};
}