The rebase dropped it, so the five hook/lint rust and shell checks that main builds were silently missing from nix flake check. Merge them back under the F2 additions (package, vm, vm-peers, module-peers).
57 lines
1.9 KiB
Nix
57 lines
1.9 KiB
Nix
{
|
|
description = "skyg-linux-tracker: read-only systemd, journal and Docker monitor";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
system = "x86_64-linux";
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
forAll = f: nixpkgs.lib.genAttrs systems (s: f nixpkgs.legacyPackages.${s});
|
|
in
|
|
{
|
|
packages = forAll (pkgs: rec {
|
|
skyg-linux-tracker = pkgs.callPackage ./nix/package.nix { };
|
|
default = skyg-linux-tracker;
|
|
});
|
|
|
|
nixosModules.default = { pkgs, lib, ... }: {
|
|
imports = [ ./nix/module.nix ];
|
|
services.skyg-linux-tracker.package =
|
|
lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
};
|
|
|
|
checks.${system} =
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
import ./nix/checks.nix {
|
|
inherit pkgs;
|
|
package = self.packages.${system}.default;
|
|
} // {
|
|
package = self.packages.${system}.default;
|
|
vm = import ./nix/tests/vm.nix {
|
|
inherit pkgs;
|
|
module = self.nixosModules.default;
|
|
};
|
|
vm-peers = import ./nix/tests/peers.nix {
|
|
inherit pkgs;
|
|
module = self.nixosModules.default;
|
|
};
|
|
# Evaluation-only: every case renders the module's config and unit,
|
|
# so forcing the list either lists the passed checks or throws. The
|
|
# output file is only there to give `nix flake check` a derivation.
|
|
module-peers = pkgs.runCommand "skyg-linux-tracker-module-peers-eval" { } ''
|
|
printf '%s\n' ${
|
|
nixpkgs.lib.escapeShellArg (
|
|
builtins.concatStringsSep "\n" (import ./nix/tests/module-peers.nix {
|
|
inherit pkgs;
|
|
module = self.nixosModules.default;
|
|
})
|
|
)
|
|
} > $out
|
|
'';
|
|
};
|
|
};
|
|
}
|