nixfleet/checks/default.nix
Andrea Ciceri 4980df6f75
Some checks failed
/ test (push) Failing after 36s
Use newer nixfmt
2024-09-20 11:24:06 +02:00

23 lines
633 B
Nix

{ inputs, self, lib, ... }: {
imports = [ inputs.treefmt-nix.flakeModule inputs.git-hooks-nix.flakeModule ];
perSystem = { pkgs, ... }: {
treefmt.config = {
projectRootFile = ".git/config";
programs.nixfmt.enable = true;
};
pre-commit.settings.hooks = { nixfmt.enable = true; };
formatter = pkgs.nixfmt-rfc-style;
};
flake.checks = let build = _: nc: nc.config.system.build.toplevel;
in {
x86_64-linux =
lib.mapAttrs build { inherit (self.nixosConfigurations) picard; };
aarch64-linux = lib.mapAttrs build {
inherit (self.nixosConfigurations) sisko; # pbp;
};
};
}