oizys/lib/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-11 16:31:51 -05:00
inputs@{ nixpkgs, self, ... }:
2024-05-06 14:32:00 -05:00
let
2024-03-01 00:26:52 -06:00
lib = nixpkgs.lib.extend (import ./extended.nix);
2024-07-03 13:05:25 -05:00
inherit (builtins) mapAttrs readDir listToAttrs;
inherit (lib) genAttrs;
2024-01-24 14:12:52 -06:00
2024-05-06 14:32:00 -05:00
inherit (import ./find-modules.nix { inherit lib; }) findModulesList;
2024-07-03 13:05:25 -05:00
inherit (import ./generators.nix { inherit lib self inputs; }) mkIso mkSystem;
2024-02-27 10:27:41 -06:00
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
2024-05-06 14:32:00 -05:00
supportedSystems = [ "x86_64-linux" ];
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
2024-07-11 16:31:51 -05:00
2024-03-21 11:06:07 -05:00
oizysFlake = {
2024-06-17 09:48:54 -05:00
nixosModules = listToAttrs (findModulesList ../modules);
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
packages = forAllSystems (pkgs: rec {
2024-07-03 13:05:25 -05:00
iso = mkIso.config.system.build.isoImage;
2024-06-28 10:17:08 -05:00
oizys-go = pkgs.callPackage ../pkgs/oizys { };
2024-06-17 09:48:54 -05:00
default = oizys-go;
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
git
deadnix
];
};
});
2024-06-17 10:06:58 -05:00
checks = forAllSystems (
pkgs:
import ./checks.nix {
inherit inputs;
system = pkgs.system;
}
);
2024-06-17 09:48:54 -05:00
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
2024-02-21 14:36:33 -06:00
};
2024-07-11 16:31:51 -05:00
in
{
inherit oizysFlake;
2024-01-23 11:51:13 -06:00
}