My Nix Configuration
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

[marvin] shelfmark: back into the container you go

dish 5aaff1ca 4a050a70

+18 -29
+18 -29
hosts/marvin/services/shelfmark.nix
··· 1 - { 2 - self, 3 - config, 4 - pkgs, 5 - ... 6 - }: 1 + { self, config, ... }: 7 2 let 8 3 d = self.lib.data.services.shelfmark; 9 4 sec = config.age.secrets; ··· 12 7 systemd.tmpfiles.settings = { 13 8 "10-shelfmark" = { 14 9 "/var/lib/shelfmark/config".d = { 15 - user = "shelfmark"; 16 - group = "shelfmark"; 10 + user = "booklore"; 11 + group = "booklore"; 17 12 mode = "0750"; 18 13 }; 19 14 "/var/media/books/unorganized".d = { 20 - user = "shelfmark"; 21 - group = "shelfmark"; 15 + user = "booklore"; 16 + group = "booklore"; 22 17 mode = "0666"; 23 18 }; 24 19 }; 25 20 }; 21 + virtualisation.oci-containers.containers.shelfmark = { 22 + image = "ghcr.io/calibrain/shelfmark:latest"; 23 + ports = [ "${toString d.port}:8084" ]; 24 + environmentFiles = [ sec.shelfmark-secrets.path ]; 25 + environment = { 26 + PUID = toString config.users.users.booklore.uid; 27 + PGID = toString config.users.groups.booklore.gid; 26 28 27 - services.shelfmark = { 28 - enable = true; 29 - environment = { 30 - FLASK_HOST = "0.0.0.0"; 31 - FLASK_PORT = d.port; 32 - # General settings 29 + # General Config 33 30 CALIBRE_WEB_URL = "https://lib.pyrox.dev"; 34 31 SEARCH_MODE = "direct"; 35 32 ONBOARDING = "false"; 33 + USING_EXTERNAL_BYPASSER = "false"; 36 34 # Downloads 37 - INGEST_DIR = "/var/media/books/unorganized"; 38 35 TEMPLATE_RENAME = "{Author} - {Title} ({Year})"; 39 36 FILE_ORGANIZATION = "rename"; 40 - # Flaresolverr 41 - USING_EXTERNAL_BYPASSER = "true"; 42 - EXT_BYPASSER_URL = "http://localhost:8191"; 43 37 # Auth 44 38 AUTH_METHOD = "oidc"; 45 39 OIDC_DISCOVERY_URL = "https://auth.pyrox.dev/.well-known/openid-configuration"; ··· 52 46 HARDCOVER_ENABLED = "true"; 53 47 OPENLIBRARY_ENABLED = "true"; 54 48 }; 49 + volumes = [ 50 + "/var/lib/shelfmark/config:/config" 51 + "/var/media/books/unorganized:/books" 52 + ]; 55 53 }; 56 - 57 - virtualisation.oci-containers.containers.byparr = { 58 - image = "ghcr.io/thephaseless/byparr:latest"; 59 - ports = [ "8191:8191" ]; 60 - }; 61 - 62 - systemd.services.shelfmark.serviceConfig.EnvironmentFile = [ sec.shelfmark-secrets.path ]; 63 - # Allow grimmory to delete files from INGEST_DIR 64 - systemd.services.grimmory.serviceConfig.SupplementaryGroups = [ "shelfmark" ]; 65 54 66 55 age.secrets.shelfmark-secrets = { 67 56 file = ./secrets/shelfmark-secrets.age;