mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-21 21:50:43 -06:00
tidy up caddy setup with alternate frontend to match dayl.in
This commit is contained in:
parent
19f855252d
commit
6adc7e7f7d
2 changed files with 29 additions and 25 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
elizabeth-and-daylin.com {
|
elizabeth-and-daylin.com {
|
||||||
reverse_proxy http://localhost:4321
|
reverse_proxy http://localhost:4321
|
||||||
}
|
}
|
||||||
|
@ -6,10 +7,6 @@ elizabeth.dayl.in, www.elizabeth-and-daylin.com {
|
||||||
redir https://elizabeth-and-daylin.com{uri} permanent
|
redir https://elizabeth-and-daylin.com{uri} permanent
|
||||||
}
|
}
|
||||||
|
|
||||||
#attic.dayl.in {
|
|
||||||
# reverse_proxy http://localhost:5656
|
|
||||||
#}
|
|
||||||
|
|
||||||
git.dayl.in {
|
git.dayl.in {
|
||||||
reverse_proxy http://localhost:3000
|
reverse_proxy http://localhost:3000
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{ pkgs, enabled, ... }:
|
{ pkgs, enabled, ... }:
|
||||||
let
|
let
|
||||||
atticPort = "5656";
|
atticPort = "5656";
|
||||||
|
static = pkgs.runCommandLocal "static-files" { } ''
|
||||||
|
mkdir $out
|
||||||
|
cp ${./caddy/index.html} $out/index.html
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -15,12 +19,22 @@ in
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.comin = enabled // {
|
||||||
|
remotes = [
|
||||||
|
{
|
||||||
|
name = "origin";
|
||||||
|
url = "https://github.com/daylinmorgan/oizys.git";
|
||||||
|
branches.main.name = "main";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
security.polkit = enabled; # attic was looking for this...
|
security.polkit = enabled; # attic was looking for this...
|
||||||
environment.systemPackages = [ pkgs.attic-client ];
|
environment.systemPackages = [ pkgs.attic-client ];
|
||||||
|
|
||||||
# allow docker to forward the request to the host running attic
|
# allow docker to forward the request to the host running attic
|
||||||
# https://discourse.nixos.org/t/docker-container-not-resolving-to-host/30259/6
|
# https://discourse.nixos.org/t/docker-container-not-resolving-to-host/30259/6
|
||||||
networking.firewall.extraCommands = "iptables -A INPUT -p tcp --destination-port ${atticPort} -s 172.16.0.0/12 -j ACCEPT";
|
# networking.firewall.extraCommands = "iptables -A INPUT -p tcp --destination-port ${atticPort} -s 172.16.0.0/12 -j ACCEPT";
|
||||||
services.atticd = enabled // {
|
services.atticd = enabled // {
|
||||||
|
|
||||||
# Replace with absolute path to your credentials file
|
# Replace with absolute path to your credentials file
|
||||||
|
@ -56,26 +70,19 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.comin = enabled // {
|
|
||||||
remotes = [
|
|
||||||
{
|
|
||||||
name = "origin";
|
|
||||||
url = "https://github.com/daylinmorgan/oizys.git";
|
|
||||||
branches.main.name = "main";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.caddy = enabled // {
|
services.caddy = enabled // {
|
||||||
extraConfig =
|
extraConfig = builtins.readFile ./caddy/Caddyfile;
|
||||||
builtins.readFile ./caddy/Caddyfile
|
virtualHosts."attic.dayl.in".extraConfig = ''
|
||||||
+ ''
|
redir /oizys /
|
||||||
${builtins.readFile ./caddy/Caddyfile}
|
|
||||||
attic.dayl.in {
|
handle / {
|
||||||
root * ${./caddy}
|
root * ${static}
|
||||||
file_server index.html
|
file_server
|
||||||
reverse_proxy /* http://localhost:5656
|
}
|
||||||
}
|
|
||||||
'';
|
handle /* {
|
||||||
|
reverse_proxy http://localhost:5656
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue