Fix error handling and add nixos test

This commit is contained in:
Tim Schubert 2024-12-29 13:38:29 +01:00
parent c06b3a7142
commit ef60878471
Signed by: dadada
SSH key fingerprint: SHA256:bFAjFH3hR8zRBaJjzQDjc3o4jqoq5EZ87l+KXEjxIz0
6 changed files with 335 additions and 20 deletions

View file

@ -2,7 +2,7 @@
description = "a653rs-router";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
@ -16,9 +16,9 @@
let
pkgs = import nixpkgs { inherit system; };
in
{
rec {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
nativeBuildInputs = [
pkgs.cargo
pkgs.clang
pkgs.clippy
@ -31,10 +31,25 @@
];
};
packages = {
default = pkgs.callPackage ./default.nix {};
default = pkgs.callPackage ./default.nix { };
};
checks = {
vm = nixpkgs.lib.nixos.runTest (
import ./test.nix {
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
pam_honeypot = packages.default;
})
];
};
}
);
};
}
) // {
)
// {
nixosModules = {
default = ./module.nix;
};