nixos-config/machines/orbi/service-surrealdb.nix
Ingolf Wagner 7a6510a4e6
Some checks are pending
Build all NixOS Configurations / nix build (push) Waiting to run
nix fmt
2024-08-29 08:26:04 +07:00

48 lines
862 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"
];
};
};
};
}