added calibre-web
This commit is contained in:
parent
31d3bab859
commit
5a79f212e9
2 changed files with 63 additions and 0 deletions
58
modules/calibre-web.nix
Normal file
58
modules/calibre-web.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = import ./vars.nix;
|
||||
name = "calibre";
|
||||
#dbport = cfg.XXX.dbport;
|
||||
#db_host = cfg.podman.hostIP;
|
||||
port = cfg.calibre.port;
|
||||
domain = cfg.calibre.domain;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
#./podman.nix
|
||||
#./podman-postgresql.nix # for the database
|
||||
./nginx.nix # for the webserver
|
||||
];
|
||||
|
||||
#sops.secrets."${name}/db" = {};
|
||||
#sops.secrets."${name}/env" = {};
|
||||
|
||||
#services.podman-postgresql."${name}" = {
|
||||
# enable = true;
|
||||
# image = "docker.io/library/postgres:16-alpine";
|
||||
# port = (lib.strings.toInt dbport);
|
||||
# passwordFile = config.sops.secrets."${name}/db".path;
|
||||
#};
|
||||
|
||||
virtualisation.oci-containers.containers.${name} = {
|
||||
image = "lscr.io/linuxserver/calibre-web";
|
||||
environment = {
|
||||
TZ = "Europe/Berlin";
|
||||
DOCKER_MODS = "linuxserver/mods:universal-calibre";
|
||||
};
|
||||
#environmentFiles = [ config.sops.secrets."${name}/env".path ];
|
||||
ports = [
|
||||
"${port}:${port}"
|
||||
];
|
||||
volumes = [
|
||||
"/var/lib/calibre:/config"
|
||||
"/mnt/mergerfs/media/books:/books"
|
||||
];
|
||||
extraOptions = cfg.podman.extraOptions;
|
||||
};
|
||||
|
||||
#services.nginx.virtualHosts.${domain} = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations."/" = {
|
||||
# proxyPass = "http://localhost:${port}";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# extraConfig = ''
|
||||
# access_log /var/log/nginx/${domain}_access.log;
|
||||
# error_log /var/log/nginx/${domain}_error.log;
|
||||
# '';
|
||||
#};
|
||||
|
||||
}
|
||||
# vim: set et ts=2 sw=2 ai:
|
||||
|
|
@ -29,6 +29,11 @@
|
|||
port = "8086";
|
||||
};
|
||||
|
||||
calibre = {
|
||||
domain = "calibre.mc-fucker.cool";
|
||||
port = "8083";
|
||||
};
|
||||
|
||||
ihatemoney = {
|
||||
db = "ihatemoney";
|
||||
domain = "geld.mc-fucker.cool";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue