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

53 lines
1,001 B
Nix
Raw Normal View History

2024-08-29 03:26:04 +02:00
{
config,
pkgs,
lib,
clanCore,
factsGenerator,
components,
2024-08-31 18:28:34 +02:00
inputs,
2024-08-29 03:26:04 +02:00
...
}:
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 ];
verify.closed.public.ports.surrealdb = [ surrealdbPort ];
2024-06-22 22:11:22 +02:00
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;
2024-08-31 18:28:34 +02:00
imports = [
"${components}/monitor/container.nix"
inputs.nix-topology.nixosModules.default
];
2024-08-29 03:26:04 +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
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
};
}