mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-05 02:29:08 +00:00
Compare commits
3 Commits
e59c565e2f
...
a7006af5ad
Author | SHA1 | Date | |
---|---|---|---|
|
a7006af5ad | ||
|
452afd70c1 | ||
|
0c399fc269 |
@ -233,6 +233,7 @@
|
||||
irc = "irc.${baseName}";
|
||||
metrics = "metrics.${baseName}";
|
||||
minecraft = "minecraft.${baseName}";
|
||||
n8n = "n8n.${baseName}";
|
||||
prometheus = "prom.${baseName}";
|
||||
paperless = "paper.${baseName}";
|
||||
secrets = "vault.${baseName}";
|
||||
|
3
hosts/arrow/aws/outputs.tf
Normal file
3
hosts/arrow/aws/outputs.tf
Normal file
@ -0,0 +1,3 @@
|
||||
output "host_ip" {
|
||||
value = aws_instance.instance.public_ip
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
cloudflare.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.caddy.enable = true;
|
||||
services.n8n.enable = true;
|
||||
|
||||
# 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;
|
||||
|
@ -125,6 +125,10 @@
|
||||
type = lib.types.str;
|
||||
description = "Hostname for IRC services.";
|
||||
};
|
||||
n8n = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for n8n automation.";
|
||||
};
|
||||
transmission = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for peer2peer downloads (Transmission).";
|
||||
|
@ -4,18 +4,11 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
|
||||
options = {
|
||||
n8nServer = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for n8n automation";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.services.n8n.enable {
|
||||
|
||||
config = lib.mkIf (config.n8nServer != null) {
|
||||
unfreePackages = [ "n8n" ];
|
||||
|
||||
services.n8n = {
|
||||
enable = true;
|
||||
settings = {
|
||||
n8n = {
|
||||
listenAddress = "127.0.0.1";
|
||||
@ -24,13 +17,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
# 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.n8nServer ]; } ];
|
||||
match = [ { host = [ config.hostnames.n8n ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = "localhost:5678"; } ];
|
||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.n8n.settings.n8n.port}"; } ];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user