mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 18:32:24 +00:00
Compare commits
No commits in common. "a7006af5ad52708de12c0784f0b337dcffd8a302" and "e59c565e2fbafbad6bf390ea479d3775b91c7cc9" have entirely different histories.
a7006af5ad
...
e59c565e2f
@ -233,7 +233,6 @@
|
|||||||
irc = "irc.${baseName}";
|
irc = "irc.${baseName}";
|
||||||
metrics = "metrics.${baseName}";
|
metrics = "metrics.${baseName}";
|
||||||
minecraft = "minecraft.${baseName}";
|
minecraft = "minecraft.${baseName}";
|
||||||
n8n = "n8n.${baseName}";
|
|
||||||
prometheus = "prom.${baseName}";
|
prometheus = "prom.${baseName}";
|
||||||
paperless = "paper.${baseName}";
|
paperless = "paper.${baseName}";
|
||||||
secrets = "vault.${baseName}";
|
secrets = "vault.${baseName}";
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
output "host_ip" {
|
|
||||||
value = aws_instance.instance.public_ip
|
|
||||||
}
|
|
@ -22,7 +22,6 @@
|
|||||||
cloudflare.enable = true;
|
cloudflare.enable = true;
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.caddy.enable = true;
|
services.caddy.enable = true;
|
||||||
services.n8n.enable = true;
|
|
||||||
|
|
||||||
# nix-index seems to eat up too much memory for Vultr
|
# nix-index seems to eat up too much memory for Vultr
|
||||||
home-manager.users.${globals.user}.programs.nix-index.enable = inputs.nixpkgs.lib.mkForce false;
|
home-manager.users.${globals.user}.programs.nix-index.enable = inputs.nixpkgs.lib.mkForce false;
|
||||||
|
@ -125,10 +125,6 @@
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Hostname for IRC services.";
|
description = "Hostname for IRC services.";
|
||||||
};
|
};
|
||||||
n8n = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for n8n automation.";
|
|
||||||
};
|
|
||||||
transmission = lib.mkOption {
|
transmission = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Hostname for peer2peer downloads (Transmission).";
|
description = "Hostname for peer2peer downloads (Transmission).";
|
||||||
|
@ -4,11 +4,18 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
config = lib.mkIf config.services.n8n.enable {
|
options = {
|
||||||
|
n8nServer = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Hostname for n8n automation";
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
unfreePackages = [ "n8n" ];
|
config = lib.mkIf (config.n8nServer != null) {
|
||||||
|
|
||||||
services.n8n = {
|
services.n8n = {
|
||||||
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
n8n = {
|
n8n = {
|
||||||
listenAddress = "127.0.0.1";
|
listenAddress = "127.0.0.1";
|
||||||
@ -17,17 +24,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure Cloudflare DNS to point to this machine
|
|
||||||
services.cloudflare-dyndns.domains = [ config.hostnames.n8n ];
|
|
||||||
|
|
||||||
# Allow web traffic to Caddy
|
|
||||||
caddy.routes = [
|
caddy.routes = [
|
||||||
{
|
{
|
||||||
match = [ { host = [ config.hostnames.n8n ]; } ];
|
match = [ { host = [ config.n8nServer ]; } ];
|
||||||
handle = [
|
handle = [
|
||||||
{
|
{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.n8n.settings.n8n.port}"; } ];
|
upstreams = [ { dial = "localhost:5678"; } ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user