nixbsd-config/flake.nix
2024-03-04 01:50:31 +00:00

45 lines
940 B
Nix

{
inputs = {
nixpkgs.url = "github:rhelmot/nixpkgs/freebsd-staging";
utils.url = "github:numtide/flake-utils";
nixbsd = {
url = "github:nixos-bsd/nixbsd";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "utils";
};
};
outputs =
{
nixpkgs,
nixbsd,
utils,
...
}:
let
baseDir = ./system;
makeSystem = module: nixbsd.lib.nixbsdSystem { modules = [ module ]; };
in
{
nixosConfigurations = nixpkgs.lib.mapAttrs (name: _: makeSystem (baseDir + "/${name}")) (
builtins.readDir baseDir
);
}
//
utils.lib.eachSystem
[
"aarch64-linux"
"x86_64-linux"
"x86_64-freebsd"
]
(
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
formatter = pkgs.nixfmt-rfc-style;
}
);
}