Files
invoiceninja-nixos/flake.nix
T
awkawbandClaude Sonnet 5 4e544f6e46 flake: add cachix binary cache
Adds nixConfig substituter/key for the invoiceninja-nixos cachix cache,
a `just push-cache` target to build and push the package and automated
test to it, and exposes the UI frontend build as a passthru output
(`invoiceninja.ui`) so it can be built and pushed independently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-22 15:59:29 -04:00

55 lines
1.5 KiB
Nix

{
description = "An Invoice Ninja package and module.";
nixConfig = {
extra-substituters = [ "https://invoiceninja-nixos.cachix.org" ];
extra-trusted-public-keys = [
"invoiceninja-nixos.cachix.org-1:TmRZaji8FFVjjIw9KZmvLrxMxfP+JDThOyOX04z526A="
];
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
outputs =
{ self, nixpkgs, nix, }:
let
systems = [ "x86_64-linux" ];
forEachSystem = nixpkgs.lib.genAttrs systems;
overlayList = [ self.overlays.default ];
pkgsBySystem = forEachSystem (
system:
import nixpkgs {
inherit system;
overlays = overlayList;
}
);
in
rec {
nixosConfigurations = {
test-nginx = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ (import ./tests/default.nix { proxyServer = "nginx"; }) ];
};
test-caddy = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ (import ./tests/default.nix { proxyServer = "caddy"; }) ];
};
};
overlays.default = final: prev: { invoiceninja = final.callPackage ./package.nix { }; };
packages = forEachSystem (system: {
invoiceninja = pkgsBySystem.${system}.invoiceninja;
default = pkgsBySystem.${system}.invoiceninja;
});
checks = forEachSystem (system: {
invoiceninja = import ./tests/nixos-test.nix { inherit system; nixpkgsPath = nixpkgs; };
});
nixosModules = import ./nixos-module { overlays = overlayList; };
};
}