1
0
Fork 0

wip: expose websites via nginx

This commit is contained in:
Daniel Kempkens 2022-12-01 15:51:08 +01:00
parent 86191e1961
commit f12a00b045
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
2 changed files with 26 additions and 0 deletions

View file

@ -17,6 +17,8 @@ in
(import ../nixos/synapse.nix (args // { inherit secret; })) (import ../nixos/synapse.nix (args // { inherit secret; }))
../nixos/websites.nix
(import ../nixos/tailscale.nix (args // { inherit secret; })) (import ../nixos/tailscale.nix (args // { inherit secret; }))
../nixos/arion.nix ../nixos/arion.nix

24
system/nixos/websites.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.website-docs-nifoc-pw ];
services.nginx = {
enable = true;
# Documentation
virtualHosts = builtins.listToAttrs builtins.map
(domain: {
name = domain;
value = {
root = "${pkgs.website-docs-nifoc-pw}/site/${domain}";
extraConfig = ''
autoindex on;
autoindex_format html;
'';
};
}) [ "katja.nifoc.pw" ];
};
networking.firewall.allowedTCPPorts = [ 80 ];
}