nixos-config/machines/orbi/service-surrealdb.nix

39 lines
799 B
Nix
Raw Normal View History

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