mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
Compare commits
3 commits
b5f3463ee2
...
b2a250e584
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2a250e584 | ||
|
|
558115d0d8 | ||
|
|
1d55fff3a0 |
7 changed files with 77 additions and 16 deletions
16
flake.lock
generated
16
flake.lock
generated
|
|
@ -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"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
40
modules/quadlets/booklore/default.nix
Normal file
40
modules/quadlets/booklore/default.nix
Normal 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 = { };
|
||||
};
|
||||
}
|
||||
11
modules/quadlets/default.nix
Normal file
11
modules/quadlets/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.quadlet-nix.nixosModules.quadlet
|
||||
];
|
||||
|
||||
virtualisation.quadlet = {
|
||||
enable = true;
|
||||
autoEscape = lib.mkForce true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.calibre-server = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = "8092";
|
||||
};
|
||||
}
|
||||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue