nixos-config/machines/orbi/service-surrealdb.nix
2024-08-08 16:39:50 +02:00

38 lines
799 B
Nix

{ config, pkgs, lib, clanCore, factsGenerator, components, ... }:
let
surrealdbPort = 8000;
in
{
networking.firewall.interfaces.wg0.allowedTCPPorts = [ surrealdbPort ];
containers.surrealdb = {
privateNetwork = false;
autoStart = true;
config = { config, lib, ... }: {
nixpkgs.pkgs = pkgs;
imports = [ "${components}/monitor/container.nix" ];
system.stateVersion = "24.05";
services.logrotate.checkConfig = false; # because uid 3000 does not exist in here
# Photoprism
# ----------
services.surrealdb = {
enable = true;
host = "0.0.0.0";
port = surrealdbPort;
extraFlags = [
"--auth"
"--user"
"root"
"--pass"
"root"
];
};
};
};
}