nixbsd-config/flake.nix

45 lines
940 B
Nix
Raw Normal View History

2024-03-04 01:30:20 +00:00
{
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;
2024-03-04 01:50:31 +00:00
makeSystem = module: nixbsd.lib.nixbsdSystem { modules = [ module ]; };
2024-03-04 01:30:20 +00:00
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;
}
);
}