caddy: fix senior project site
This commit is contained in:
parent
b2665758ee
commit
54668635e9
17
flake.lock
generated
17
flake.lock
generated
@ -353,6 +353,7 @@
|
|||||||
"nix-minecraft": "nix-minecraft",
|
"nix-minecraft": "nix-minecraft",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"senior_project-website": "senior_project-website",
|
||||||
"srvos": "srvos",
|
"srvos": "srvos",
|
||||||
"vpn-confinement": "vpn-confinement"
|
"vpn-confinement": "vpn-confinement"
|
||||||
}
|
}
|
||||||
@ -378,6 +379,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"senior_project-website": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756849912,
|
||||||
|
"narHash": "sha256-tBSyS/vksHbfeAWWEBIRxitkFx6tFj1QjrjNbnPdW5s=",
|
||||||
|
"owner": "Titaniumtown",
|
||||||
|
"repo": "senior-project-website",
|
||||||
|
"rev": "8c1d000091b0379f0741598a18f55dcbd6d47c66",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Titaniumtown",
|
||||||
|
"repo": "senior-project-website",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"srvos": {
|
"srvos": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|||||||
@ -42,6 +42,11 @@
|
|||||||
url = "github:serokell/deploy-rs";
|
url = "github:serokell/deploy-rs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
senior_project-website = {
|
||||||
|
url = "github:Titaniumtown/senior-project-website";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
|||||||
@ -3,8 +3,25 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
service_configs,
|
service_configs,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
hugoWebsite = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "hugo-site";
|
||||||
|
version = "0.1";
|
||||||
|
|
||||||
|
src = inputs.senior_project-website;
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
hugo
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
hugo --minify -d $out;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# TODO! fix conflicting definition values
|
# TODO! fix conflicting definition values
|
||||||
@ -15,8 +32,8 @@
|
|||||||
*/
|
*/
|
||||||
];
|
];
|
||||||
|
|
||||||
services.caddy.virtualHosts."senior-project".extraConfig = ''
|
services.caddy.virtualHosts."senior-project.${service_configs.https.domain}".extraConfig = ''
|
||||||
root * ${service_configs.https.senior_project_dir}
|
root * ${hugoWebsite}
|
||||||
file_server browse
|
file_server browse
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user