Compare commits
3 Commits
e751dfc1b2
...
1ed7ab9776
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ed7ab9776 | ||
|
|
dd8867b52f | ||
|
|
3668eb2829 |
@@ -22,4 +22,20 @@
|
|||||||
|
|
||||||
# ─── Add your custom NixOS configuration below ───────────
|
# ─── Add your custom NixOS configuration below ───────────
|
||||||
|
|
||||||
|
# ─── Custom Caddy virtual hosts ──────────────────────────
|
||||||
|
# Uncomment and edit below to add your own Caddy sites:
|
||||||
|
#
|
||||||
|
# sovran_systemsOS.caddy.extraVirtualHosts = ''
|
||||||
|
# mysite.example.com {
|
||||||
|
# encode gzip zstd
|
||||||
|
# root * /var/lib/www/mysite
|
||||||
|
# php_fastcgi unix//run/phpfpm/mypool.sock
|
||||||
|
# file_server browse
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# anotherdomain.com {
|
||||||
|
# reverse_proxy localhost:9090
|
||||||
|
# }
|
||||||
|
# '';
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
exposeBtcpay = config.sovran_systemsOS.web.btcpayserver;
|
exposeBtcpay = config.sovran_systemsOS.web.btcpayserver;
|
||||||
|
extraVhosts = config.sovran_systemsOS.caddy.extraVirtualHosts;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
@@ -170,6 +171,11 @@ EOF
|
|||||||
encode gzip zstd
|
encode gzip zstd
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# ── Custom vhosts from custom.nix ──────────────
|
||||||
|
cat >> /run/caddy/Caddyfile <<'CUSTOM_VHOSTS_EOF'
|
||||||
|
${extraVhosts}
|
||||||
|
CUSTOM_VHOSTS_EOF
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,15 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ── Caddy customisation ───────────────────────────────────
|
||||||
|
caddy = {
|
||||||
|
extraVirtualHosts = lib.mkOption {
|
||||||
|
type = lib.types.lines;
|
||||||
|
default = "";
|
||||||
|
description = "Additional raw Caddyfile blocks appended to the generated Caddy config. Use this in custom.nix to add custom domains and reverse proxies.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# ── Domain setup registry ─────────────────────────────────
|
# ── Domain setup registry ─────────────────────────────────
|
||||||
domainRequirements = lib.mkOption {
|
domainRequirements = lib.mkOption {
|
||||||
type = lib.types.listOf (lib.types.submodule {
|
type = lib.types.listOf (lib.types.submodule {
|
||||||
|
|||||||
Reference in New Issue
Block a user