flake.nix: use flake-utils for system gen

This commit is contained in:
2026-04-16 13:50:51 -04:00
parent 60fcce47df
commit b97ed1e90c
2 changed files with 56 additions and 18 deletions

View File

@@ -3,33 +3,37 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self, nixpkgs }:
let
supportedSystems = [
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachSystem
[
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
nixosModules.default = import ./module.nix;
nixosModules.arr-init = import ./module.nix;
checks = forAllSystems (
]
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./tests {
inherit pkgs;
lib = nixpkgs.lib;
inherit self;
}
);
{
checks = import ./tests {
inherit pkgs;
lib = nixpkgs.lib;
inherit self;
};
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-tree);
formatter = pkgs.nixfmt-tree;
}
)
// {
nixosModules.default = import ./module.nix;
nixosModules.arr-init = import ./module.nix;
};
}