Compare commits

..

3 commits

Author SHA1 Message Date
TheWanderingCrow
b2a250e584 drop calibre; add booklore quadlet; need to figure out proxying 2025-12-09 09:26:40 -05:00
TheWanderingCrow
558115d0d8 add quadlet-nix 2025-12-08 10:23:01 -05:00
TheWanderingCrow
1d55fff3a0 fix backup service 2025-12-08 09:03:50 -05:00
7 changed files with 77 additions and 16 deletions

16
flake.lock generated
View file

@ -384,6 +384,21 @@
"type": "github"
}
},
"quadlet-nix": {
"locked": {
"lastModified": 1763141753,
"narHash": "sha256-XAHkOkLEWbRQZ6t/SowwOukrUfIneNQOC/UEQlTaPBU=",
"owner": "SEIAROTg",
"repo": "quadlet-nix",
"rev": "211b5c626cf9ea91403b510e2ac5ca03a7194566",
"type": "github"
},
"original": {
"owner": "SEIAROTg",
"repo": "quadlet-nix",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
@ -398,6 +413,7 @@
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"nvix": "nvix",
"quadlet-nix": "quadlet-nix",
"sops-nix": "sops-nix"
}
},

View file

@ -115,6 +115,7 @@
};
iamb-flake.url = "github:ulyssa/iamb/v0.0.11-alpha.1";
quadlet-nix.url = "github:SEIAROTg/quadlet-nix";
# CrOS inputs
nix-secrets.url = "git+ssh://git@github.com/TheWanderingCrow/nix-secrets";

View file

@ -39,6 +39,9 @@
"hosts/common/optional/keyd.nix"
"hosts/common/optional/podman.nix"
# Quadlets
"modules/quadlets"
# Hosted services
"modules/services/mealie"
"modules/services/actualbudget"

View file

@ -0,0 +1,40 @@
{ config, ... }:
{
services.caddy.virtualHosts."booklore.wanderingcrow.net".extraConfig = ''
reverse_proxy http://10.88.0.4:6060
'';
virtualisation.quadlet = {
containers = {
booklore-web.containerConfig = {
image = "ghcr.io/booklore-app/booklore:v1.13.2";
environments = {
USER_ID = "0";
GROUP_ID = "0";
TZ = "America/New_York";
DATABASE_URL = "jdbc:mariadb://booklore-db:3306/booklore";
DB_USER = "booklore";
DB_PASSWORD = "changeme";
BOOKLORE_PORT = "6060";
};
publishPorts = [
""
];
pod = config.virtualisation.quadlet.pods.booklore.ref;
};
booklore-db.containerConfig = {
image = "lscr.io/linuxserver/mariadb:11.4.5";
environments = {
PUID = "1000";
PGID = "1000";
TZ = "America/New_York";
MYSQL_ROOT_PASSWORD = "changeme";
MYSQL_DATABASE = "booklore";
MYSQL_USER = "booklore";
MYSQL_PASSWORD = "changeme";
};
pod = config.virtualisation.quadlet.pods.booklore.ref;
};
};
pods.booklore = { };
};
}

View file

@ -0,0 +1,11 @@
{ inputs, lib, ... }:
{
imports = [
inputs.quadlet-nix.nixosModules.quadlet
];
virtualisation.quadlet = {
enable = true;
autoEscape = lib.mkForce true;
};
}

View file

@ -1,12 +0,0 @@
{
config,
lib,
...
}:
{
services.calibre-server = {
enable = true;
host = "0.0.0.0";
port = "8092";
};
}

View file

@ -2,9 +2,11 @@
pkgs,
inputs,
...
}: let
}:
let
volumePath = "/overseer/services";
in {
in
{
systemd.tmpfiles.rules = [
"d ${volumePath}/flamesites 0750 crow"
"d ${volumePath}/flamesites/swgalaxyproject 0750 crow"
@ -13,7 +15,7 @@ in {
systemd.timers.flamesite-backup = {
enable = true;
wantedBy = ["timers.target"];
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "1hr";
OnUnitActiveSec = "1hr";
@ -24,7 +26,7 @@ in {
systemd.services.flamesite-backup = {
script = ''
${pkgs.podman}/bin/podman exec swgal_db_1 sh -c 'exec mysqldump --no-tablespaces -usgr_user -psgr_pass sgr_db' > ${volumePath}/flamesites/swgalaxyproject/db.sql
${pkgs.podman}/bin/podman exec nssbluegrass_db_1 sh -c 'exec mysqldump --no-tablespaces -unns_user -pnns_pass nns_db' > ${volumePath}/flamesites/nnsbluegrass/db.sql
${pkgs.podman}/bin/podman exec nnsbluegrass_db_1 sh -c 'exec mysqldump --no-tablespaces -unns_user -pnns_pass nns_db' > ${volumePath}/flamesites/nnsbluegrass/db.sql
'';
serviceConfig = {
Type = "oneshot";