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

48 lines
862 B
Nix
Raw Normal View History

2024-08-29 03:26:04 +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;
2024-08-29 03:26:04 +02:00
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
2024-06-22 19:31:50 +02:00
2024-08-29 03:26:04 +02:00
# Photoprism
# ----------
services.surrealdb = {
enable = true;
host = "0.0.0.0";
port = surrealdbPort;
extraFlags = [
"--auth"
"--user"
"root"
"--pass"
"root"
];
};
2024-06-22 19:31:50 +02:00
2024-08-29 03:26:04 +02:00
};
2024-06-22 19:31:50 +02:00
};
}