nixbsd-config/flake.nix

45 lines
936 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;
makeSystem = module: nixbsd.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;
}
);
}