feat: add rss-bridge and calibre-web (#135)

* hax

* hax

* shell monitoring

* hax radicale!

* hacking

* haxor

* hax

* hack

* feat: refactor paths etc for impermance

* fix: restic

* hax

* more hax

* feat: migrate z2m

* fix: websockets i guess

* cleanup

* hacks

* hax

* feat: miniflux + postgres

* feat: add calibre

* feat: calibre-web

* Auto lint/format

* feat: add calibre/web + rss-bridge

* hax

---------

Co-authored-by: Truxnell <9149206+truxnell@users.noreply.github.com>
Co-authored-by: truxnell <truxnell@users.noreply.github.com>
This commit is contained in:
Truxnell 2024-05-05 18:08:04 +10:00 committed by GitHub
parent ddf1699d1e
commit 10a01f67cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 20 deletions

View file

@ -35,6 +35,9 @@
radicale.enable = true; radicale.enable = true;
miniflux.enable = true; miniflux.enable = true;
calibre-web.enable = true;
rss-bridge.enable = true;
}; };
mySystem.containers = { mySystem.containers = {

View file

@ -69,14 +69,14 @@ in
users.users.truxnell.extraGroups = [ group ]; users.users.truxnell.extraGroups = [ group ];
# Folder perms - only for containers environment.persistence."${config.mySystem.system.impermanence.persistPath}" = lib.mkIf config.mySystem.system.impermanence.enable {
# systemd.tmpfiles.rules = [ directories = [{ directory = appFolder; inherit user; inherit group; mode = "750"; }];
# "d ${persistentFolder}/ 0750 ${user} ${group} -" };
# ];
## service ## service
services.calibre-web = { services.calibre-web = {
enable = true; enable = true;
listen.ip = "0.0.0.0";
listen.port = port; listen.port = port;
options = { options = {
calibreLibrary = "${config.mySystem.nasFolder}/natflix/books/"; calibreLibrary = "${config.mySystem.nasFolder}/natflix/books/";

View file

@ -27,5 +27,6 @@
./nginx ./nginx
./miniflux ./miniflux
./calibre-web ./calibre-web
./rss-bridge
]; ];
} }

View file

@ -76,6 +76,11 @@ in
# "d ${persistentFolder}/ 0750 ${user} ${group} -" # "d ${persistentFolder}/ 0750 ${user} ${group} -"
# ]; # ];
environment.persistence."${config.mySystem.system.impermanence.persistPath}" = lib.mkIf config.mySystem.system.impermanence.enable {
directories = [{ directory = appFolder; inherit user; inherit group; mode = "750"; }];
};
## service ## service
# services.test= { # services.test= {
# enable = true; # enable = true;

View file

@ -10,8 +10,8 @@ let
category = "services"; category = "services";
description = "rss feed for sites without"; description = "rss feed for sites without";
# image = "%{image}"; # image = "%{image}";
inherit (services.rss-bridge) user;#string inherit (config.services.rss-bridge) user;#string
inherit (services.rss-bridge) group;#string inherit (config.services.rss-bridge) group;#string
port = 1234; #int port = 1234; #int
appFolder = "/var/lib/${app}"; appFolder = "/var/lib/${app}";
# persistentFolder = "${config.mySystem.persistentFolder}/var/lib/${appFolder}"; # persistentFolder = "${config.mySystem.persistentFolder}/var/lib/${appFolder}";
@ -70,16 +70,12 @@ in
users.users.truxnell.extraGroups = [ group ]; users.users.truxnell.extraGroups = [ group ];
# Folder perms - only for containers
# systemd.tmpfiles.rules = [
# "d ${persistentFolder}/ 0750 ${user} ${group} -"
# ];
## service ## service
# services.test= { services.rss-bridge = {
# enable = true; enable = true;
# }; whitelist = [ "*" ];
virtualHost = "${url}";
};
# homepage integration # homepage integration
mySystem.services.homepage.infrastructure = mkIf cfg.addToHomepage [ mySystem.services.homepage.infrastructure = mkIf cfg.addToHomepage [
@ -107,9 +103,6 @@ in
services.nginx.virtualHosts.${url} = { services.nginx.virtualHosts.${url} = {
forceSSL = true; forceSSL = true;
useACMEHost = config.networking.domain; useACMEHost = config.networking.domain;
locations."^~ /" = {
proxyPass = "http://127.0.0.1:${builtins.toString port}";
};
}; };
### firewall config ### firewall config
@ -125,12 +118,12 @@ in
"WARNING: Backups for ${app} are disabled!") "WARNING: Backups for ${app} are disabled!")
]; ];
services.restic.backups = config.lib.mySystem.mkRestic services.restic.backups = mkIf cfg.backup (config.lib.mySystem.mkRestic
{ {
inherit app user; inherit app user;
paths = [ appFolder ]; paths = [ appFolder ];
inherit appFolder; inherit appFolder;
}; });
# services.postgresqlBackup = { # services.postgresqlBackup = {