Files

61 lines
1.8 KiB
Nix

# SPDX-License-Identifier: CPAL-1.0
# Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
# License 1.0: see LICENSE (its Exhibit A is this file's notice).
{
description = "Ianitor Domi: a reverse proxy on Pingora with a small Domi CA, a web UI and an API";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
outputs =
{ self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forAll = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in
{
packages = forAll (pkgs: rec {
ianitor-web = pkgs.callPackage ./deploy/nixos/web.nix { };
ianitor = pkgs.callPackage ./deploy/nixos/package.nix { inherit ianitor-web; };
default = ianitor;
});
nixosModules.ianitor = import ./deploy/nixos/module.nix self;
nixosModules.default = self.nixosModules.ianitor;
# NixOS VM tests (ROADMAP §5 layer 4); they need KVM.
checks.x86_64-linux = import ./deploy/nixos/tests {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
inherit self;
};
# The tools of the five test layers (ROADMAP §5), for scripts/*.sh, tests/fuzz/run.sh and the
# `layers` pipeline: `nix develop .#ci -c <command>`.
devShells = forAll (pkgs: {
ci = pkgs.mkShell {
packages = with pkgs; [
cargo
rustc
clippy
rustfmt
cargo-fuzz
cmake
pkg-config
git
jq
caddy
pebble
h2spec
testssl
oha
nodejs_22
pnpm_11
# the slow-client probes (tests/support/probes)
python3
];
};
});
formatter = forAll (pkgs: pkgs.nixfmt-rfc-style);
};
}