Files

49 lines
1.3 KiB
Nix

{
description = "OpenAI-compatible adapter exposing n8n chat agents behind /v1/chat/completions";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
beamPackages = pkgs.beamPackages;
in
{
default = beamPackages.mixRelease {
pname = "n8n-openai-adapter";
version = "0.1.0";
src = self;
mixFodDeps = beamPackages.fetchMixDeps {
pname = "n8n-openai-adapter";
version = "0.1.0";
src = self;
hash = "sha256-sdAhpZUeF33V9xjEa/z/aTmCllfetMjO/1XyfJfUNao=";
};
};
}
);
overlays.default = final: prev: {
n8n-openai-adapter = self.packages.${final.stdenv.system}.default;
};
# Proper NixOS module: consume with
# imports = [ inputs.n8n-openai-adapter.nixosModules.default ];
# services.n8n-openai-adapter = { enable = true; domain = "..."; port = 8134; };
nixosModules.default = import ./nixos-module.nix;
};
}