Personal-use NixOS configuration
at main 26 lines 579 B view raw
1{ 2 hosts ? [ ], 3}: 4 5{ config, flakeLib, ... }: 6 7{ 8 services.audiobookshelf = { 9 enable = true; 10 11 host = "unix//run/audiobookshelf/audiobookshelf.sock"; 12 }; 13 14 systemd.services.audiobookshelf.serviceConfig = { 15 RuntimeDirectory = config.services.audiobookshelf.user; 16 RuntimeDirectoryMode = "0750"; 17 UMask = "0007"; 18 }; 19 20 # Caddy reverse proxy configuration 21 users.users.caddy.extraGroups = [ config.services.audiobookshelf.group ]; 22 23 services.caddy.virtualHosts = flakeLib.mkProxies hosts '' 24 reverse_proxy ${config.services.audiobookshelf.host} 25 ''; 26}