feat(az-cld-1): add snipe-it service

This commit is contained in:
2026-06-18 10:28:14 +02:00
parent e344edfe2c
commit a3d4bd7ab5
8 changed files with 152 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
{
config,
pkgs,
...
}: let
mysqlPort = config.m3ta.ports.get "mysql";
in {
services.mysql = {
enable = true;
package = pkgs.mariadb;
settings = {
mysqld = {
"bind-address" = "127.0.0.1";
port = mysqlPort;
max_connections = 200;
innodb_buffer_pool_size = "1G";
"character-set-server" = "utf8mb4";
"collation-server" = "utf8mb4_unicode_ci";
"skip-name-resolve" = true;
};
client = {
port = mysqlPort;
socket = "/run/mysqld/mysqld.sock";
};
mysqldump = {
quick = true;
"single-transaction" = true;
};
};
};
services.mysqlBackup = {
enable = true;
calendar = "03:40:00";
databases = ["snipeit"];
singleTransaction = true;
};
networking.firewall.extraCommands = ''
iptables -A INPUT -p tcp -s 127.0.0.1 --dport ${toString mysqlPort} -j ACCEPT
'';
}