nix-configs/homelab/honeyfetch-app/default.nix
Aaron Honeycutt de53a26819 format nix
2025-09-18 17:24:56 -06:00

46 lines
1,011 B
Nix

{
config,
pkgs,
lib,
...
}: {
services.nginx = {
enable = true;
virtualHosts."honeyfetch.app" = {
root = "/mnt/DATA/honeyfetch-website/public";
listen = [
{
addr = "0.0.0.0";
port = 8081;
}
];
locations."/" = {
extraConfig = ''
default_type text/html;
'';
};
locations."~* \.atom\.xml$" = {
extraConfig = ''
types { } default_type "application/atom+xml; charset=utf-8";
'';
};
};
};
systemd.user.services."honeyfetch-website-zola-build" = {
enable = true;
description = "rebuild zola honeyfetch website";
serviceConfig = {
ExecStart = "/run/current-system/sw/bin/zola -r /mnt/DATA/honeyfetch-website build";
};
wantedBy = ["default.target"];
};
systemd.user.timers."honeyfetch-website-zola-build" = {
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = "2h";
OnUnitActiveSec = "7h";
};
};
}