1
0
Fork 0
dotfiles/system/nixos/websites.nix

32 lines
706 B
Nix
Raw Normal View History

2022-12-01 15:51:08 +01:00
{ pkgs, ... }:
{
services.nginx = {
enable = true;
2023-02-20 20:24:34 +01:00
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedBrotliSettings = true;
2022-12-01 15:51:08 +01:00
# Documentation
2022-12-01 15:56:38 +01:00
virtualHosts = builtins.listToAttrs (builtins.map
2022-12-01 15:51:08 +01:00
(domain: {
name = domain;
value = {
2022-12-26 18:17:59 +01:00
listen = [
{
addr = "127.0.0.1";
port = 80;
}
];
2022-12-01 15:51:08 +01:00
root = "${pkgs.website-docs-nifoc-pw}/site/${domain}";
2022-12-26 18:17:59 +01:00
2022-12-01 15:51:08 +01:00
extraConfig = ''
autoindex on;
autoindex_format html;
'';
};
2022-12-01 16:21:38 +01:00
}) [ "katja.nifoc.pw" "katja_vmstats.nifoc.pw" "noesis.nifoc.pw" "propagator.nifoc.pw" ]);
2022-12-01 15:51:08 +01:00
};
}