diff --git a/hosts/h001/flake.lock b/hosts/h001/flake.lock index ca64101d..f67047b5 100644 --- a/hosts/h001/flake.lock +++ b/hosts/h001/flake.lock @@ -225,6 +225,22 @@ "type": "github" } }, + "n8n-nixpkgs": { + "locked": { + "lastModified": 1764667669, + "narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "418468ac9527e799809c900eda37cbff999199b6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixarr": { "inputs": { "nixpkgs": "nixpkgs_2", @@ -1266,6 +1282,7 @@ "forgejo-nixpkgs": "forgejo-nixpkgs", "home-manager": "home-manager", "litellm-nixpkgs": "litellm-nixpkgs", + "n8n-nixpkgs": "n8n-nixpkgs", "nixarr": "nixarr", "nixpkgs": "nixpkgs_3", "oauth2-proxy-nixpkgs": "oauth2-proxy-nixpkgs", diff --git a/hosts/h001/flake.nix b/hosts/h001/flake.nix index ceaed299..c07c21dd 100644 --- a/hosts/h001/flake.nix +++ b/hosts/h001/flake.nix @@ -12,6 +12,7 @@ zitadel-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; beszel-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; forgejo-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + n8n-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Use relative to get current version for testing # common.url = "path:../../flakes/common"; diff --git a/hosts/h001/mods/n8n.nix b/hosts/h001/mods/n8n.nix index a99d889a..834bbcac 100644 --- a/hosts/h001/mods/n8n.nix +++ b/hosts/h001/mods/n8n.nix @@ -1,7 +1,20 @@ { + inputs, + pkgs, + lib, ... }: +let + declaration = "services/misc/n8n.nix"; + nixpkgsN8n = inputs.n8n-nixpkgs; + pkgsN8n = import nixpkgsN8n { + inherit (pkgs) system; + config.allowUnfree = true; + }; +in { + disabledModules = [ declaration ]; + imports = [ "${nixpkgsN8n}/nixos/modules/${declaration}" ]; options = { }; config = { services.nginx.virtualHosts = { @@ -19,12 +32,11 @@ }; }; - # Expose litellm to my overlay network as well - # networking.firewall.interfaces."tailscale0".allowedTCPPorts = [ port ]; - services.n8n = { enable = true; }; + # no package override in this service option + systemd.services.n8n.serviceConfig.ExecStart = lib.mkForce "${pkgsN8n.n8n}/bin/n8n"; systemd.services.n8n.environment = { # N8N_SECURE_COOKIE = "false"; N8N_LISTEN_ADDRESS = "127.0.0.1";