making dionysos the caddy server

This commit is contained in:
chloe 2025-03-09 12:48:57 +01:00
parent 689c11e4eb
commit 0e916f7c08
3 changed files with 64 additions and 2 deletions

View file

@ -7,7 +7,7 @@ let
username = "harry123";
in
{
imports = [../../features/server/tailscale.nix];
imports = [ ../../features/server/tailscale.nix ];
environment.systemPackages = with pkgs; [
weechat
tmux
@ -29,10 +29,12 @@ in
];
};
users.users.${username}.initialHashedPassword = "$y$j9T$s4isXqWcg4N8TEPjmj0fD/$zog2cpUwstnvwDnQsFmH3br/WAeD2Uu/L7ePr00cKkA";
users.users.${username}.initialHashedPassword =
"$y$j9T$s4isXqWcg4N8TEPjmj0fD/$zog2cpUwstnvwDnQsFmH3br/WAeD2Uu/L7ePr00cKkA";
environment.variables.EDITOR = "nvim";
# TODO: migrate this to sisyphe
services.nginx = {
enable = true;
recommendedGzipSettings = true;

View file

@ -0,0 +1,57 @@
{ pkgs, ... }:
{
services.caddy = {
enable = true;
package = (
pkgs.callPackage
"${builtins.fetchurl "https://raw.githubusercontent.com/jpds/nixpkgs/a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf/pkgs/servers/caddy/default.nix"}"
{
externalPlugins = [
{
name = "caddy-dns/acmedns";
repo = "https://github.com/caddy-dns/acmedns";
version = "";
}
{
name = "caddy-dns/cloudflare";
repo = "https://github.com/caddy-dns/cloudflare";
version = "";
}
];
}
);
virtualHosts = {
"hypervirtual.world" = {
serverAliases = [ "www.hypervirtual.world" ];
extraConfig = ''
encode zstd gzip
reverse_proxy 192.168.1.203:8088
'';
};
"git.hypervirtual.world".extraConfig = ''
reverse_proxy 192.168.1.177:80
encode zstd gzip
'';
"freshrss.hypervirtual.world".extraConfig = '''';
"status.hypervirtual.world".extraConfig = '''';
"books.hypervirtual.world".extraConfig = '''';
"fish.hypervirtual.world".extraConfig = '''';
"cloud.hypervirtual.world".extraConfig = ''
redir /.well-known/carddav /remote.php/dav/ 301
redir /.well-known/caldav /remote.php/dav/ 301
reverse_proxy 192.168.1.177:80
encode zstd gzip
'';
# TODO: migrate rougebordeaux config
"rougebordeaux.xyz" = {
};
"pds.rougebordeaux.xyz".extraConfig = '''';
};
};
}

View file

@ -0,0 +1,3 @@
{
# TODO: configure i2pd redirection
}