mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
move website to garage
dynamic updates at any time without a nixos rebuild!
This commit is contained in:
parent
56cf4e9212
commit
6b97a53344
36 changed files with 88 additions and 96 deletions
|
|
@ -1,25 +1,23 @@
|
|||
{ pkgs, lib, my-projects-versions, ... }:
|
||||
let
|
||||
website = import (pkgs.fetchFromGitHub my-projects-versions.website.fetchFromGitHub);
|
||||
blog = pkgs.fetchFromGitHub my-projects-versions.blog.fetchFromGitHub;
|
||||
slides = pkgs.fetchFromGitHub my-projects-versions.slides.fetchFromGitHub;
|
||||
website-build = website { inherit pkgs slides blog; };
|
||||
in
|
||||
{
|
||||
{ ... }: {
|
||||
services.caddy.globalConfig = ''
|
||||
filesystem garage s3 {
|
||||
bucket noratrieb.dev
|
||||
region garage
|
||||
endpoint http://localhost:3900
|
||||
use_path_style
|
||||
}
|
||||
'';
|
||||
services.caddy.virtualHosts = {
|
||||
"noratrieb.dev" = {
|
||||
logFormat = "";
|
||||
extraConfig = ''
|
||||
encode zstd gzip
|
||||
header -Last-Modified
|
||||
root * ${import ../../packages/caddy-static-prepare {
|
||||
name = "website";
|
||||
src = website-build;
|
||||
inherit pkgs lib;
|
||||
}}
|
||||
file_server {
|
||||
etag_file_extensions .sha256
|
||||
precompressed zstd gzip br
|
||||
fs garage
|
||||
# TODO: run precompress script
|
||||
# etag_file_extensions .sha256
|
||||
# precompressed zstd gzip br
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue