mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-02-04 09:10:01 +01:00
temmie: set up httpd
This commit is contained in:
@@ -1,18 +1,21 @@
|
|||||||
{ config, fp, pkgs, values, ... }:
|
{ config, fp, pkgs, values, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
(fp /base)
|
(fp /base)
|
||||||
|
|
||||||
./services/nfs-mounts.nix
|
./services/nfs-mounts.nix
|
||||||
];
|
./services/userweb.nix
|
||||||
|
];
|
||||||
|
|
||||||
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
|
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
|
||||||
matchConfig.Name = "ens18";
|
matchConfig.Name = "ens18";
|
||||||
address = with values.hosts.temmie; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
address = with values.hosts.temmie; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx.enable = false;
|
||||||
|
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
|
|
||||||
# Don't change (even during upgrades) unless you know what you are doing.
|
# Don't change (even during upgrades) unless you know what you are doing.
|
||||||
|
|||||||
29
hosts/temmie/services/userweb.nix
Normal file
29
hosts/temmie/services/userweb.nix
Normal 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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user