diff --git a/hosts/temmie/configuration.nix b/hosts/temmie/configuration.nix index ba9930f..a7e2b19 100644 --- a/hosts/temmie/configuration.nix +++ b/hosts/temmie/configuration.nix @@ -1,18 +1,21 @@ { config, fp, pkgs, values, ... }: { imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - (fp /base) + # Include the results of the hardware scan. + ./hardware-configuration.nix + (fp /base) - ./services/nfs-mounts.nix - ]; + ./services/nfs-mounts.nix + ./services/userweb.nix + ]; systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { matchConfig.Name = "ens18"; 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. diff --git a/hosts/temmie/services/userweb.nix b/hosts/temmie/services/userweb.nix new file mode 100644 index 0000000..3cfcebb --- /dev/null +++ b/hosts/temmie/services/userweb.nix @@ -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 +}