1
Fork 0
satellite/hosts/nixos/lapetus/services/intray.nix

42 lines
962 B
Nix
Raw Normal View History

2024-02-02 02:44:51 +01:00
{ inputs, config, ... }:
let
username = "prescientmoon";
apiHost = "api.intray.moonythm.dev";
apiPort = 8402;
webHost = "intray.moonythm.dev";
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 03:18:10 +01:00
# {{{ Configure intray
services.intray.production = {
enable = true;
2024-02-02 03:18:10 +01:00
configureNetworking = false;
api-server = {
enable = true;
hosts = [ apiHost ];
port = apiPort;
admins = [ username ];
};
web-server = {
enable = true;
hosts = [ webHost ];
port = webPort;
api-url = "https://${apiHost}";
};
};
# }}}
# {{{ Networking & storage
services.nginx.virtualHosts.${apiHost} = config.satellite.proxy apiPort;
services.nginx.virtualHosts.${webHost} = config.satellite.proxy webPort;
environment.persistence."/persist/state".directories = [
"/www/intray/production/data"
];
# }}}
}