mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2024-11-28 19:24:20 +01:00
make everything build with nix flake check
This commit is contained in:
parent
1e67e0badb
commit
c7c2d45d00
12
flake.nix
12
flake.nix
@ -21,7 +21,7 @@
|
||||
};
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ self, lib, ... }: {
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
@ -36,7 +36,7 @@
|
||||
./modules/flake-module.nix
|
||||
./checks/flake-module.nix
|
||||
];
|
||||
perSystem = { config, pkgs, ... }: {
|
||||
perSystem = { config, self', system, pkgs, ... }: {
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.hclfmt.enable = true;
|
||||
@ -56,6 +56,14 @@
|
||||
]))
|
||||
];
|
||||
};
|
||||
|
||||
checks =
|
||||
let
|
||||
nixosMachines = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
|
||||
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
|
||||
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
||||
in
|
||||
nixosMachines // packages // devShells;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user