homepage tinkering
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
@@ -16,7 +14,6 @@ in {
|
||||
ports = [80 443];
|
||||
in {
|
||||
allowedTCPPorts = ports;
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
@@ -36,8 +33,21 @@ in {
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
# environmentFile = config.age.secrets.cloudflare-env.path;
|
||||
# package = self.packages.${pkgs.system}.caddy-with-plugins;
|
||||
globalConfig = ''
|
||||
auto_https off
|
||||
'';
|
||||
virtualHosts = {
|
||||
"http://${config.server.domain}" = {
|
||||
extraConfig = ''
|
||||
redir https://{host}{uri}
|
||||
'';
|
||||
};
|
||||
"http://*.${config.server.domain}" = {
|
||||
extraConfig = ''
|
||||
redir https://{host}{uri}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ in {
|
||||
services.glances.enable = true;
|
||||
services.${service} = {
|
||||
enable = true;
|
||||
environmentFile = builtins.toFile "homepage.env" "HOMEPAGE_ALLOWED_HOSTS=${server.domain}";
|
||||
environmentFile = config.age.secrets.homepage-env.path;
|
||||
customCSS = ''
|
||||
body, html {
|
||||
font-family: SF Pro Display, Helvetica, Arial, sans-serif !important;
|
||||
|
||||
Reference in New Issue
Block a user