❄️ Nix configurations
0
fork

Configure Feed

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

feat: switch to postgresql

Signed-off-by: A. Ottr <alex@otter.foo>

A. Ottr c991139e ae8b37cc

+43 -1
+43 -1
modules/nixos/server/homebox.nix
··· 3 3 { 4 4 services.homebox = { 5 5 enable = true; 6 + settings = { 7 + PORT = "27745"; 8 + HBOX_STORAGE_DATA = "/var/lib/homebox/data"; 9 + HBOX_OPTIONS_ALLOW_REGISTRATION = "true"; 10 + HBOX_OPTIONS_CHECK_GITHUB_RELEASE = "false"; 11 + HBOX_MODE = "production"; 12 + HBOX_WEB_MAX_UPLOAD_SIZE = "20"; 13 + 14 + # HBOX_DATABASE_DRIVER = "postgres"; 15 + # HBOX_DATABASE_HOST = "/run/postgresql"; 16 + # HBOX_DATABASE_USER = "homebox"; 17 + # HBOX_DATABASE_DATABASE = "homebox"; 18 + 19 + }; 20 + database.createLocally = true; 6 21 }; 7 22 8 - networking.firewall.allowedTCPPorts = [ 7745 ]; 23 + # services.postgresql = { 24 + # ensureDatabases = [ "homebox" ]; 25 + # ensureUsers = [ 26 + # { 27 + # name = "homebox"; 28 + # ensureDBOwnership = true; 29 + # } 30 + # ]; 31 + # }; 32 + 33 + networking.firewall.allowedTCPPorts = [ 27745 ]; 34 + 35 + services.traefik.dynamicConfigOptions.http = { 36 + routers = { 37 + homebox = { 38 + entryPoints = [ "websecure" ]; 39 + rule = "Host(`homebox.otter.place`)"; 40 + service = "homebox"; 41 + tls.certResolver = "letsencrypt"; 42 + }; 43 + }; 44 + }; 45 + 46 + services.traefik.dynamicConfigOptions.services = { 47 + homebox = { 48 + loadBalancer.servers = [{ url = "http://localhost:27745"; }]; 49 + }; 50 + }; 9 51 }