Add linter.

This commit is contained in:
Kevin Baensch 2023-09-11 20:59:03 +02:00
parent 6f9db5e3a4
commit 8fd1b6c982
Signed by: derped
GPG key ID: C0F1D326C7626543

View file

@ -26,6 +26,12 @@
lib = nixpkgs.lib; lib = nixpkgs.lib;
fn = import ./fn.nix {inherit lib;}; fn = import ./fn.nix {inherit lib;};
mappedFormatter = builtins.mapAttrs (arch: packages: packages.default) alejandra.packages; mappedFormatter = builtins.mapAttrs (arch: packages: packages.default) alejandra.packages;
mappedApps = builtins.mapAttrs (_arch: packages: {
"lint" = {
type = "app";
program = "${packages.statix}/bin/statix";
};
}) nixpkgs.legacyPackages;
system = "x86_64-linux"; system = "x86_64-linux";
machineList = fn.lst { machineList = fn.lst {
p = toString ./machines; p = toString ./machines;
@ -68,6 +74,7 @@
}; };
}; };
in { in {
apps = mappedApps;
formatter = mappedFormatter; formatter = mappedFormatter;
nixosConfigurations = lib.listToAttrs (map nixosSystemFor machineList); nixosConfigurations = lib.listToAttrs (map nixosSystemFor machineList);
}; };