66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:rhelmot/nixpkgs/freebsd-staging";
|
|
utils.url = "github:numtide/flake-utils";
|
|
nix = {
|
|
url = "github:rhelmot/nix/freebsd-staging";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.nixpkgs-regression.follows = "nixpkgs";
|
|
};
|
|
nixbsd = {
|
|
url = "github:nixos-bsd/nixbsd";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.utils.follows = "utils";
|
|
inputs.nix.follows = "nix";
|
|
};
|
|
attic = {
|
|
url = "github:nixos-bsd/attic";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "utils";
|
|
inputs.nix.follows = "nix";
|
|
inputs.nixpkgs-stable.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
nixbsd,
|
|
utils,
|
|
attic,
|
|
...
|
|
}@inputs:
|
|
let
|
|
baseDir = ./system;
|
|
makeSystem =
|
|
module:
|
|
nixbsd.lib.nixbsdSystem {
|
|
modules = [ module ];
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
};
|
|
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;
|
|
}
|
|
);
|
|
}
|