Compare commits
2 Commits
b15b3c9ebf
...
2c830905d1
Author | SHA1 | Date | |
---|---|---|---|
2c830905d1 | |||
fa5dd946de |
18
Caddyfile
Normal file
18
Caddyfile
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
auto_https off
|
||||
}
|
||||
|
||||
:8080 {
|
||||
root * ./result/public
|
||||
encode gzip
|
||||
file_server
|
||||
|
||||
# redirect to your custom 404 page
|
||||
handle_errors {
|
||||
@404 {
|
||||
expression {http.error.status_code} == 404
|
||||
}
|
||||
rewrite @404 /404.html
|
||||
file_server
|
||||
}
|
||||
}
|
15
flake.nix
15
flake.nix
@ -13,12 +13,12 @@
|
||||
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||
url = "https://project-cloud.net";
|
||||
url_deploy = "https://project-cloud.net";
|
||||
url_local = "http://localhost:8080";
|
||||
name = "project-cloud";
|
||||
theme = theme_anemone;
|
||||
in {
|
||||
packages = forAllSystems (system: {
|
||||
default = pkgs.${system}.stdenv.mkDerivation {
|
||||
package = system: url:
|
||||
pkgs.${system}.stdenv.mkDerivation {
|
||||
inherit name;
|
||||
nativeBuildInputs = with pkgs.${system}; [zola];
|
||||
|
||||
@ -35,11 +35,16 @@
|
||||
cp -r public/ $out/
|
||||
'';
|
||||
};
|
||||
in {
|
||||
packages = forAllSystems (system: rec {
|
||||
project-cloud = package system url_deploy;
|
||||
test = package system url_local;
|
||||
default = project-cloud;
|
||||
});
|
||||
|
||||
devShells = forAllSystems (system: {
|
||||
default = pkgs.${system}.mkShellNoCC {
|
||||
packages = with pkgs.${system}; [zola];
|
||||
packages = with pkgs.${system}; [zola caddy];
|
||||
};
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user