configuration.nix/flake-modules/checks.nix
Jalil David Salamé Messina e03cd65e87
All checks were successful
/ check (push) Successful in 20s
/ build (audiomenu) (push) Successful in 2s
/ build (docs) (push) Successful in 2s
/ build (jpassmenu) (push) Successful in 2s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 2s
/ build (nvim) (push) Successful in 1s
feat: use flake-parts to clean up the flake.nix
This is much more manageable!
2024-10-04 23:50:12 +02:00

26 lines
647 B
Nix

{ lib, ... }:
{
perSystem =
{ pkgs, self', ... }:
{
checks =
let
src = builtins.path {
path = ../.;
name = "configuration.nix";
};
runCmdInSrc =
name: cmd:
pkgs.runCommandNoCC name { } ''
cd ${src}
${cmd}
mkdir $out
'';
in
{
fmt = runCmdInSrc "fmt-src" "${lib.getExe self'.formatter} --check .";
lint = runCmdInSrc "lint-src" "${lib.getExe pkgs.statix} check .";
typos = runCmdInSrc "typos-src" "${lib.getExe pkgs.typos} .";
};
};
}