hostnames and user settings

This commit is contained in:
Noah Masur
2025-02-08 12:58:06 -05:00
parent 9c5de4c54f
commit 61b1ceffd9
45 changed files with 253 additions and 275 deletions

View File

@ -6,6 +6,7 @@
}:
let
cfg = config.services.filebrowser;
hostnames = config.nmasur.settings.hostnames;
dataDir = "/var/lib/filebrowser";
@ -57,7 +58,7 @@ in
};
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.files ];
services.cloudflare-dyndns.domains = [ hostnames.files ];
};

View File

@ -1,40 +0,0 @@
# n8n is an automation integration tool for connecting data from services
# together with triggers.
{ config, lib, ... }:
{
config = lib.mkIf config.services.n8n.enable {
unfreePackages = [ "n8n" ];
services.n8n = {
webhookUrl = "https://${config.hostnames.n8n}";
settings = {
listen_address = "127.0.0.1";
port = 5678;
};
};
systemd.services.n8n.environment = {
N8N_EDITOR_BASE_URL = config.services.n8n.webhookUrl;
};
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.n8n ];
# Allow web traffic to Caddy
caddy.routes = [
{
match = [ { host = [ config.hostnames.n8n ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = "localhost:${builtins.toString config.services.n8n.settings.port}"; } ];
}
];
}
];
};
}