nixos-config/hosts/web/webserver.nix

80 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2022-05-26 10:55:06 +00:00
{config, pkgs, ...}:
let
caddyDir = "/var/lib/caddy";
in
{
services.caddy = {
enable = true;
email = "lucazeau.alexandre@gmail.com";
extraConfig = ''
2022-05-26 10:55:06 +00:00
storage file_system {
root * ${caddyDir}
2022-05-26 10:55:06 +00:00
}
2022-05-26 10:55:06 +00:00
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
2023-12-28 12:54:54 +00:00
reverse_proxy http://localhost:8080
}
2023-12-28 18:11:02 +00:00
https://bin.atlanticaweb.fr {
reverse_proxy http://localhost:8081
}
2022-05-26 10:55:06 +00:00
atlanticaweb.fr {
root * /srv/www/atlanticaweb.fr
encode gzip zstd
file_server
}
atlanticaweb.fr:2021 {
metrics
}
2023-07-28 18:11:10 +00:00
https://sync.atlanticaweb.fr {
reverse_proxy http://localhost:8384 {
header_up Host {upstream_hostport}
}
}
2022-05-26 10:55:06 +00:00
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;
2023-12-28 18:11:02 +00:00
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";
};
};
};
2022-05-26 10:55:06 +00:00
}