temmie: set up httpd

This commit is contained in:
h7x4
2026-01-22 19:41:52 +09:00
parent 39d3773a10
commit 95f6463171
2 changed files with 37 additions and 5 deletions

View File

@@ -6,6 +6,7 @@
(fp /base)
./services/nfs-mounts.nix
./services/userweb.nix
];
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
@@ -13,6 +14,8 @@
address = with values.hosts.temmie; [ (ipv4 + "/25") (ipv6 + "/64") ];
};
services.nginx.enable = false;
services.qemuGuest.enable = true;
# Don't change (even during upgrades) unless you know what you are doing.

View File

@@ -0,0 +1,29 @@
{ ... }:
{
services.httpd = {
enable = true;
# extraModules = [];
# virtualHosts."userweb.pvv.ntnu.no" = {
virtualHosts."temmie.pvv.ntnu.no" = {
forceSSL = true;
enableACME = true;
};
};
systemd.services.httpd = {
after = [ "pvv-homedirs.target" ];
requires = [ "pvv-homedirs.target" ];
serviceConfig = {
ProtectHome = "tmpfs";
BindPaths = let
letters = [ "a" "b" "c" "d" "h" "i" "j" "k" "l" "m" "z" ];
in map (l: "/run/pvv-home-mounts/${l}:/home/pvv/${l}") letters;
};
};
# TODO: create phpfpm pools with php environments that contain packages similar to those present on tom
}