add some new services to orbi

This commit is contained in:
Ingolf Wagner 2024-06-22 19:31:50 +02:00
parent c101339245
commit 26267569eb
Signed by: palo
GPG key ID: 76BF5F1928B9618B
4 changed files with 115 additions and 9 deletions

View file

@ -13,6 +13,8 @@
./service-photoprism.nix
./service-taskserver.nix
./service-vaultwarden.nix
./service-surrealdb.nix
./service-vikunja.nix
./nginx-ingolf-wagner-de.nix
./nginx-wkd.nix

View file

@ -108,8 +108,8 @@ in
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
# "com.sun:auto-snapshot:weekly" = toString true;
# "com.sun:auto-snapshot:monthly" = toString true;
};
};
"matrix-terranix" = {
@ -120,8 +120,32 @@ in
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
# "com.sun:auto-snapshot:weekly" = toString true;
# "com.sun:auto-snapshot:monthly" = toString true;
};
};
"surrealdb" = {
type = "zfs_fs";
mountpoint = "/var/lib/nixos-containers/surrealdb";
options = {
mountpoint = "legacy";
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
#"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = toString true;
#"com.sun:auto-snapshot:monthly" = toString true;
};
};
"vikunja" = {
type = "zfs_fs";
mountpoint = "/var/lib/nixos-containers/vikunja";
options = {
mountpoint = "legacy";
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = toString true;
#"com.sun:auto-snapshot:monthly" = toString true;
};
};
};
@ -141,9 +165,6 @@ in
options = {
mountpoint = "legacy";
compression = "lz4";
#"com.sun:auto-snapshot:daily" = false;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
};
};
photoprism = {
@ -154,8 +175,6 @@ in
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
};
};
};

View file

@ -0,0 +1,24 @@
{ config, pkgs, lib, ... }:
{
containers.surrealdb = {
privateNetwork = false;
autoStart = true;
config = { config, lib, ... }: {
nixpkgs.pkgs = pkgs;
imports = [ ../../components/monitor/container.nix ];
system.stateVersion = "24.05";
# Photoprism
# ----------
services.surrealdb = {
enable = true;
host = "0.0.0.0";
};
};
};
}

View file

@ -0,0 +1,61 @@
{ config, pkgs, lib, ... }:
let
vikunjaPort = 3456;
mysqlPort = 3337;
in
{
networking.firewall.interfaces.wg0.allowedTCPPorts = [ vikunjaPort ];
containers.vikunja = {
privateNetwork = false;
autoStart = true;
config = { config, lib, ... }: {
nixpkgs.pkgs = pkgs;
imports = [ ../../components/monitor/container.nix ];
system.stateVersion = "24.05";
# Vikunja
# ----------
services.vikunja = {
enable = true;
port = vikunjaPort;
frontendScheme = "http";
frontendHostname = "vikunja.ingolf-wagner.de";
database.type = "sqlite";
#database = {
# type = "mysql";
# host = "localhost:${toString mysqlPort}";
# user = "vikunja";
#};
};
# MySQL Database
# --------------
services.mysql = {
enable = false;
package = pkgs.mariadb;
settings.mysqld.port = mysqlPort;
ensureDatabases = [ "vikunja" ];
ensureUsers = [{
name = "vikunja";
ensurePermissions = {
"vikunja.*" = "ALL PRIVILEGES";
};
}];
};
# Backup Database
# ---------------
services.mysqlBackup = {
enable = false;
databases = config.services.mysql.ensureDatabases;
singleTransaction = true;
};
};
};
}