feat(oracle): update configuration.nix

This commit is contained in:
Michael Thomas 2024-05-08 14:41:21 +00:00
parent 0da02d747a
commit f65babd85a

View File

@ -1,4 +1,4 @@
{ pkgs, config, ... }: {
{ pkgs, config, lib, ... }: {
imports = [
./hardware-configuration.nix
];
@ -63,6 +63,40 @@
# Services
services.caddy = {
enable = true;
package =
let
caddyWithPlugins = builtins.fetchurl {
url = "https://raw.githubusercontent.com/jpds/nixpkgs/a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf/pkgs/servers/caddy/default.nix";
sha256 = "sha256:1x1g6qyhmclz2jyc5nmfjsri3xx4pw5rd15n2xjkxlgdcvywcv5f";
};
in
(pkgs.callPackage "${caddyWithPlugins}" {
externalPlugins = [
{
name = "greenpau/caddy-security";
repo = "github.com/greenpau/caddy-security";
version = "v1.1.23";
}
];
vendorHash = "sha256-rGNyeHZZBxVM8GMUQMV/JzkK9S/l8tefaQde/d4x9LA=";
});
globalConfig = ''
email michaelhthomas@outlook.com
'';
virtualHosts = {
"s.michaelt.xyx".extraConfig = ''
respond "Coming soon!"
'';
"auth.s.michaelt.xyz".extraConfig = ''
reverse_proxy http://10.0.10.2:7654
'';
"traggo.s.michaelt.xyz".extraConfig = ''
reverse_proxy http://10.0.10.2:3030
'';
"git.s.michaelt.xyz".extraConfig = ''
reverse_proxy http://10.0.10.2:3000
'';
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];