80 lines
1.7 KiB
Nix
80 lines
1.7 KiB
Nix
{config, pkgs, ...}:
|
|
let
|
|
caddyDir = "/var/lib/caddy";
|
|
in
|
|
{
|
|
services.caddy = {
|
|
enable = true;
|
|
email = "lucazeau.alexandre@gmail.com";
|
|
extraConfig = ''
|
|
|
|
storage file_system {
|
|
root * ${caddyDir}
|
|
}
|
|
|
|
https://git.atlanticaweb.fr {
|
|
encode gzip
|
|
reverse_proxy http://localhost:3001
|
|
}
|
|
https://films.atlanticaweb.fr {
|
|
encode gzip
|
|
reverse_proxy http://localhost:8096
|
|
}
|
|
https://pocket.atlanticaweb.fr {
|
|
encode gzip
|
|
reverse_proxy http://localhost:8080
|
|
}
|
|
https://bin.atlanticaweb.fr {
|
|
reverse_proxy http://localhost:8081
|
|
}
|
|
atlanticaweb.fr {
|
|
root * /srv/www/atlanticaweb.fr
|
|
encode gzip zstd
|
|
file_server
|
|
}
|
|
atlanticaweb.fr:2021 {
|
|
metrics
|
|
}
|
|
https://sync.atlanticaweb.fr {
|
|
reverse_proxy http://localhost:8384 {
|
|
header_up Host {upstream_hostport}
|
|
}
|
|
}
|
|
www.atlanticaweb.fr {
|
|
redir https://atlanticaweb.fr{uri}
|
|
}
|
|
pizzajoffre.fr {
|
|
root * /srv/www/pizzajoffre.fr
|
|
encode gzip zstd
|
|
file_server
|
|
}
|
|
www.pizzajoffre.fr {
|
|
redir https://pizzajoffre.fr{uri}
|
|
}
|
|
'';
|
|
};
|
|
users.users.caddy = {
|
|
group = "caddy";
|
|
uid = config.ids.uids.caddy;
|
|
home = caddyDir;
|
|
createHome = true;
|
|
extraGroups = [ "users" ];
|
|
};
|
|
|
|
users.groups.caddy.gid = config.ids.uids.caddy;
|
|
services = {
|
|
jellyfin.enable = true;
|
|
shiori.enable = true;
|
|
microbin = {
|
|
enable = true;
|
|
settings = {
|
|
MICROBIN_PORT = 8081;
|
|
MICROBIN_NO_LISTING = true;
|
|
MICROBIN_ENABLE_BURN_AFTER = true;
|
|
MICROBIN_QR = true;
|
|
MICROBIN_PUBLIC_PATH = "https://bin.atlanticaweb.fr";
|
|
};
|
|
};
|
|
};
|
|
}
|