badbayan.ygg.nix 540 B

1234567891011121314151617181920212223242526
  1. let
  2. homepage.root = "/system/data/homepage";
  3. public = {
  4. alias = "/system/data/pub/";
  5. extraConfig = ''
  6. fancyindex on;
  7. fancyindex_exact_size on;
  8. directio 4M;
  9. '';
  10. };
  11. ygg = {
  12. domain = "badbayan.ygg";
  13. listen = [
  14. { addr = "[204:7039:ade1:9854:d9a7:3f43:3996:b4cc]"; }
  15. { addr = "[304:7039:ade1:9854::bad]"; }
  16. ];
  17. };
  18. in {
  19. services.nginx.virtualHosts.${ygg.domain} = {
  20. inherit (ygg) listen;
  21. addSSL = false;
  22. locations."/" = homepage;
  23. locations."/pub/" = public;
  24. };
  25. }