organize
All checks were successful
Build and Deploy / deploy (push) Successful in 2m43s
All checks were successful
Build and Deploy / deploy (push) Successful in 2m43s
This commit is contained in:
39
services/caddy/caddy_senior_project.nix
Normal file
39
services/caddy/caddy_senior_project.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user