caddy: add senior project things
This commit is contained in:
@@ -34,6 +34,9 @@
|
|||||||
./services/ups.nix
|
./services/ups.nix
|
||||||
|
|
||||||
./services/bitwarden.nix
|
./services/bitwarden.nix
|
||||||
|
|
||||||
|
# KEEP UNTIL 2028
|
||||||
|
./services/caddy_senior_project.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.targets = {
|
systemd.targets = {
|
||||||
|
|||||||
@@ -90,6 +90,10 @@
|
|||||||
certs = services_dir + "/http_certs";
|
certs = services_dir + "/http_certs";
|
||||||
# TODO! generate website from repo directly using hugo
|
# TODO! generate website from repo directly using hugo
|
||||||
data_dir = services_dir + "/http/www";
|
data_dir = services_dir + "/http/www";
|
||||||
|
|
||||||
|
# KEEP UNTIL 2028
|
||||||
|
senior_project_dir = services_dir + "/http/senior_project";
|
||||||
|
|
||||||
domain = "gardling.com";
|
domain = "gardling.com";
|
||||||
wg_ip = "192.168.15.1";
|
wg_ip = "192.168.15.1";
|
||||||
matrix_hostname = "matrix.${service_configs.https.domain}";
|
matrix_hostname = "matrix.${service_configs.https.domain}";
|
||||||
|
|||||||
23
services/caddy_senior_project.nix
Normal file
23
services/caddy_senior_project.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
service_configs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(lib.serviceMountDeps "caddy" [
|
||||||
|
service_configs.https.senior_project_dir
|
||||||
|
])
|
||||||
|
];
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."senior-project".extraConfig = ''
|
||||||
|
root * ${service_configs.https.senior_project_dir}
|
||||||
|
file_server browse
|
||||||
|
'';
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${service_configs.https.senior_project_dir} 770 ${config.services.caddy.user} ${config.services.caddy.group}"
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user