pastila: srv
This commit is contained in:
parent
735842e78b
commit
d428a9bb41
|
@ -12,6 +12,7 @@ in
|
|||
./users.nix
|
||||
./gitolite.nix
|
||||
./letsencrypt.nix
|
||||
./srv.nix
|
||||
];
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
|
|
27
pastila/srv.nix
Normal file
27
pastila/srv.nix
Normal 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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue