other website

This commit is contained in:
root 2024-06-25 23:54:18 +02:00
parent ead47f3cdb
commit e4ecd7a259

View file

@ -3,6 +3,7 @@
let
up_dir = "/srv/up";
isomorphisme_dir = "/srv/isomorphis.me";
tremeg_dir = "/srv/tremeg.net";
in
{
services.nginx.enable = true;
@ -11,7 +12,7 @@ in
# in /home. So we need to use a different location.
users.users."up" = {
isNormalUser = true;
home = up_dir;
home = "${up_dir}";
# group = config.services.nginx.group;
group = "nginx";
createHome = true;
@ -21,7 +22,7 @@ in
services.nginx.virtualHosts."srv.isomorphis.me" = {
forceSSL = true;
enableACME = true;
root = up_dir;
root = "${up_dir}";
locations = {
"/" = {
extraConfig = "autoindex on;";
@ -39,12 +40,21 @@ in
forceSSL = true;
enableACME = true;
locations."/" = {
root = isomorphisme_dir;
root = "${isomorphisme_dir}";
};
};
services.nginx.virtualHosts."tremeg.net" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = "${tremeg_dir}";
};
};
system.activationScripts."srv-permissions" = ''
chown -R up:nginx /srv/up
chown -R nginx:nginx /srv/isomorphis.me
chown -R up:nginx ${up_dir}
chown -R nginx:nginx ${isomorphisme_dir}
chown -R nginx:nginx ${tremeg_dir}
'';
}