My Nix Configuration
2
fork

Configure Feed

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

[marvin] add shelfmark service

dish 62b3b144 c02103bc

+60 -1
+1
hosts/marvin/default.nix
··· 32 32 ./services/postgres.nix 33 33 ./services/prometheus.nix 34 34 ./services/scrutiny.nix 35 + ./services/shelfmark.nix 35 36 ./services/syncthing.nix 36 37 ./services/tailscale.nix 37 38 ./services/tangled.nix
+1
hosts/marvin/services/secrets/secrets.nix
··· 42 42 "pinchflat-secrets.age".publicKeys = marvinDefault; 43 43 "planka-env.age".publicKeys = marvinDefault; 44 44 "pocket-id-secrets.age".publicKeys = marvinDefault; 45 + "shelfmark-secrets.age".publicKeys = marvinDefault; 45 46 "vaultwarden-vars.age".publicKeys = marvinDefault; 46 47 "webmentiond-env.age".publicKeys = marvinDefault; 47 48 }
hosts/marvin/services/secrets/shelfmark-secrets.age

This is a binary file and will not be displayed.

+52
hosts/marvin/services/shelfmark.nix
··· 1 + { self, config, ... }: 2 + let 3 + d = self.lib.data.services.shelfmark; 4 + sec = config.age.secrets; 5 + in 6 + { 7 + systemd.tmpfiles.settings = { 8 + "10-shelfmark" = { 9 + "/var/lib/shelfmark/config".d = { 10 + user = "booklore"; 11 + group = "booklore"; 12 + mode = "0750"; 13 + }; 14 + }; 15 + }; 16 + virtualisation.oci-containers.containers.shelfmark = { 17 + image = "ghcr.io/calibrain/shelfmark:latest"; 18 + ports = [ "${toString d.port}:8084" ]; 19 + environmentFiles = [ sec.shelfmark-secrets.path ]; 20 + environment = { 21 + PUID = toString config.users.users.booklore.uid; 22 + PGID = toString config.users.groups.booklore.gid; 23 + 24 + # General Config 25 + CALIBRE_WEB_URL = "https://lib.pyrox.dev"; 26 + # Downloads 27 + TEMPLATE_ORGANIZE = "{Author}/{Title} ({Year})"; 28 + TEMPLATE_RENAME = "{Author} - {Title} ({Year})"; 29 + # Auth 30 + AUTH_METHOD = "oidc"; 31 + OIDC_DISCOVERY_URL = "https://auth.pyrox.dev/.well-known/openid-configuration"; 32 + OIDC_CLIENT_ID = "b4e7e31f-e5f6-4fd3-9f8c-641a9dfde8b6"; 33 + OIDC_ADMIN_GROUP = "admins"; 34 + HIDE_LOCAL_AUTH = "true"; 35 + OIDC_AUTO_PROVISION = "true"; 36 + OIDC_BUTTON_LABEL = "dishNet"; 37 + # Metadata 38 + HARDCOVER_ENABLED = "true"; 39 + OPENLIBRARY_ENABLED = "true"; 40 + }; 41 + volumes = [ 42 + "/var/lib/shelfmark/config:/config" 43 + "/var/media/books/main:/books" 44 + ]; 45 + }; 46 + 47 + age.secrets.shelfmark-secrets = { 48 + file = ./secrets/shelfmark-secrets.age; 49 + owner = "booklore"; 50 + group = "booklore"; 51 + }; 52 + }
+6 -1
lib/data/services.toml
··· 6 6 # tsHost: (optional) What Tailscale host this service will run on, for services only available via Tailscale. 7 7 # # Should only be set if this is available externally, if at all, since TS-only services aren't able to be scraped. 8 8 # Current lowest unassigned service/anubis port: 6938/8410 9 - # Misc available ports: 6906, 6908-11, 6913, 6916-21, 6923-4, 6927, 6933 9 + # Misc available ports: 6908-11, 6913, 6916-21, 6923-4, 6927, 6933 10 10 # Misc Anubis available: 8401, 8407 11 11 12 12 [booklore] ··· 106 106 port = 6931 107 107 host = "marvin" 108 108 tsHost = "scrutiny" 109 + 110 + [shelfmark] 111 + port = 6906 112 + host = "marvin" 113 + tsHost = "shelfmark" 109 114 110 115 [tangled-knot] 111 116 port = 6934