setup blog

This commit is contained in:
♥ Minnie ♥ 2024-03-03 10:00:21 +08:00
parent b6352e1b51
commit 7ed0ad0d91
4 changed files with 27 additions and 0 deletions

View file

@ -5,5 +5,6 @@
./traefik ./traefik
./borgbackup.nix ./borgbackup.nix
./mpd.nix ./mpd.nix
./httpd.nix
]; ];
} }

View file

@ -0,0 +1,20 @@
{ ... }:
{
services.httpd = {
enable = true;
virtualHosts."sajenim.dev" = {
documentRoot = "/var/www/sajenim.dev";
listen = [{
ip = "192.168.1.102";
port = 5624;
}];
};
};
environment.persistence."/persist" = {
directories = [
"/var/www/sajenim.dev"
];
hideMounts = true;
};
}

View file

@ -2,11 +2,15 @@
{ {
services.traefik.dynamicConfigOptions.http.routers = { services.traefik.dynamicConfigOptions.http.routers = {
blog = {
rule = "Host(`sajenim.dev`)";
entryPoints = [ entryPoints = [
"websecure" "websecure"
]; ];
middlewares = [ middlewares = [
"geoblock"
]; ];
service = "blog";
}; };
homarr = { homarr = {

View file

@ -2,6 +2,8 @@
{ {
services.traefik.dynamicConfigOptions.http.services = { services.traefik.dynamicConfigOptions.http.services = {
blog.loadBalancer.servers = [
{ url = "http://192.168.1.102:5624"; }
]; ];
homarr.loadBalancer.servers = [ homarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7575"; } { url = "http://192.168.1.102:7575"; }