45 lines
936 B
Nix
45 lines
936 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.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;
|
||
|
}
|
||
|
);
|
||
|
}
|