2024-02-02 02:44:51 +01:00
|
|
|
{ inputs, config, ... }:
|
2024-02-02 02:42:03 +01:00
|
|
|
let
|
|
|
|
username = "prescientmoon";
|
|
|
|
apiHost = "api.intray.moonythm.dev";
|
|
|
|
apiPort = 8402;
|
|
|
|
webPort = 8403;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
2024-02-02 02:44:22 +01:00
|
|
|
../../common/optional/services/nginx.nix
|
2024-02-02 03:18:10 +01:00
|
|
|
inputs.intray.nixosModules.x86_64-linux.default
|
2024-02-02 02:42:03 +01:00
|
|
|
];
|
2024-02-02 03:18:10 +01:00
|
|
|
|
2024-02-02 02:42:03 +01:00
|
|
|
# {{{ Configure intray
|
|
|
|
services.intray.production = {
|
|
|
|
enable = true;
|
|
|
|
api-server = {
|
|
|
|
enable = true;
|
2024-02-03 16:19:51 +01:00
|
|
|
openFirewall = false;
|
2024-02-02 02:42:03 +01:00
|
|
|
port = apiPort;
|
|
|
|
admins = [ username ];
|
|
|
|
};
|
|
|
|
web-server = {
|
|
|
|
enable = true;
|
2024-02-03 16:19:51 +01:00
|
|
|
openFirewall = false;
|
2024-02-02 02:42:03 +01:00
|
|
|
port = webPort;
|
|
|
|
api-url = "https://${apiHost}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
# }}}
|
|
|
|
# {{{ Networking & storage
|
2024-02-03 15:34:35 +01:00
|
|
|
services.nginx.virtualHosts.${apiHost} = config.satellite.proxy apiPort { };
|
2024-02-03 16:19:51 +01:00
|
|
|
services.nginx.virtualHosts."intray.moonythm.dev" = config.satellite.proxy webPort { };
|
2024-02-02 02:42:03 +01:00
|
|
|
|
|
|
|
environment.persistence."/persist/state".directories = [
|
|
|
|
"/www/intray/production/data"
|
|
|
|
];
|
|
|
|
# }}}
|
|
|
|
}
|