My Nix Configuration
2
fork

Configure Feed

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

at dde1eb55cfd2f7b39bcd1a22d74c0e529c4e1071 47 lines 1.1 kB view raw
1{ data, lib, ... }: 2let 3 4 pns = data.services; 5 marvinIP = data.hosts.marvin.ts.ip4; 6 marvin = "http://${marvinIP}"; 7 inherit (data) tsNet; 8 9in 10rec { 11 mkHosts = function: services: lib.listToAttrs (map function services); 12 13 mkAnubis = 14 service: 15 lib.nameValuePair "${pns.${service}.extUrl}" { 16 extraConfig = '' 17 reverse_proxy ${marvin}:${toString pns.${service}.anubis} { 18 header_up X-Real-Ip {remote_host} 19 header_up X-Http-Version {http.request.proto} 20 } 21 ''; 22 }; 23 24 mkAnubisSites = services: mkHosts mkAnubis services; 25 26 mkTs = 27 service: 28 lib.nameValuePair "${pns.${service}.tsHost}.${tsNet}" { 29 extraConfig = '' 30 bind tailscale/${pns.${service}.tsHost} 31 tailscale_auth 32 reverse_proxy ${marvin}:${toString pns.${service}.port} 33 ''; 34 }; 35 36 mkTsSites = services: mkHosts mkTs services; 37 38 mkDirect = 39 service: 40 lib.nameValuePair "${pns.${service}.extUrl}" { 41 extraConfig = '' 42 reverse_proxy ${marvin}:${toString pns.${service}.port} 43 ''; 44 }; 45 46 mkDirectSites = services: mkHosts mkDirect services; 47}