2024-05-24 11:42:49 -04:00
|
|
|
{
|
|
|
|
|
lib,
|
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
inputs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
with lib;
|
|
|
|
|
with lib.custom; let
|
|
|
|
|
cfg = config.sites.cv;
|
|
|
|
|
in {
|
|
|
|
|
options.sites.cv = with types; {
|
|
|
|
|
enable = mkBoolOpt false "Enable CV site";
|
|
|
|
|
|
2024-07-24 12:16:23 -04:00
|
|
|
domain = mkStringOpt "cv.zackmyers.io" "The domain for the site";
|
2024-05-24 11:42:49 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
warnings =
|
|
|
|
|
lib.optional (!config.services.nginx.enable)
|
|
|
|
|
"CV site is enabled, but it depends on Nginx which is not enabled.";
|
|
|
|
|
|
|
|
|
|
services.nginx.virtualHosts.${cfg.domain} = {
|
|
|
|
|
forceSSL = true;
|
|
|
|
|
enableACME = true;
|
|
|
|
|
locations."/" = {
|
|
|
|
|
root = "${inputs.resume.packages.${pkgs.system}.default}";
|
|
|
|
|
};
|
|
|
|
|
extraConfig = ''
|
2025-03-22 16:03:07 -04:00
|
|
|
index ZacharyMyersResume.pdf;
|
2024-05-24 11:42:49 -04:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|