pastila: srv

This commit is contained in:
root 2024-06-01 12:53:00 +02:00
parent 735842e78b
commit d428a9bb41
3 changed files with 29 additions and 0 deletions

View file

@ -12,6 +12,7 @@ in
./users.nix ./users.nix
./gitolite.nix ./gitolite.nix
./letsencrypt.nix ./letsencrypt.nix
./srv.nix
]; ];
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.

27
pastila/srv.nix Normal file
View file

@ -0,0 +1,27 @@
{ config, lib, pkgs, ... }:
{
services.nginx.enable = true;
users.users."up" = {
isNormalUser = true;
group = config.services.nginx.group;
createHome = true;
};
services.nginx.virtualHosts."srv.isomorphis.me" = {
forceSSL = true;
enableACME = true;
root = config.users.users."up".home;
locations."/" = {
extraConfig = ''
autoindex on;
'';
};
locations."/i/" = {
extraConfig = ''
autoindex off;
'';
};
};
}

View file

@ -6,6 +6,7 @@
# ports to open on pastila and forward through the NAT in oven # ports to open on pastila and forward through the NAT in oven
forwardPorts = [ forwardPorts = [
{ num = 80; proto = "tcp"; } { num = 80; proto = "tcp"; }
{ num = 443; proto = "tcp"; }
{ num = 22; proto = "tcp"; } { num = 22; proto = "tcp"; }
]; ];
}; };