40 lines
752 B
Nix
40 lines
752 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
service_configs,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
theme = pkgs.fetchFromGitHub {
|
|
owner = "kaiiiz";
|
|
repo = "hugo-theme-monochrome";
|
|
rev = "d17e05715e91f41a842f2656e6bdd70cba73de91";
|
|
sha256 = "h9I2ukugVrldIC3SXefS0L3R245oa+TuRChOCJJgF24=";
|
|
};
|
|
|
|
hugoWebsite = pkgs.stdenv.mkDerivation {
|
|
pname = "hugo-site";
|
|
version = "0.1";
|
|
|
|
src = inputs.senior_project-website;
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
hugo
|
|
];
|
|
|
|
installPhase = ''
|
|
rm -fr themes/theme
|
|
cp -rv ${theme} themes/theme
|
|
hugo --minify -d $out;
|
|
'';
|
|
};
|
|
in
|
|
{
|
|
services.caddy.virtualHosts."senior-project.${service_configs.https.domain}".extraConfig = ''
|
|
root * ${hugoWebsite}
|
|
file_server browse
|
|
'';
|
|
}
|