NixOS-Config/nixos/server/package-configs/cinny/default.nix

33 lines
644 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"];
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;
};
};
};
};
}