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

32 lines
706 B
Nix
Raw Normal View History

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