refactor oizysFlake

This commit is contained in:
Daylin Morgan 2024-06-17 09:48:54 -05:00
parent 097dc5677f
commit 97084f9c08
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -22,10 +22,8 @@ let
inherit (import ./find-modules.nix { inherit lib; }) findModulesList; inherit (import ./find-modules.nix { inherit lib; }) findModulesList;
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; #supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
supportedSystems = [ "x86_64-linux" ]; supportedSystems = [ "x86_64-linux" ];
in
rec {
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; })); forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
oizysModules = listToAttrs (findModulesList ../modules);
mkSystem = mkSystem =
hostName: hostName:
@ -50,51 +48,29 @@ rec {
}; };
}; };
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts); in
oizysPkg = forAllSystems (pkgs: rec { {
oizys-zig = pkgs.callPackage ../pkgs/oizys/oizys-zig { inherit zig2nix; };
oizys-nim = pkgs.callPackage ../pkgs/oizys/oizys-nim { };
oizys-rs = pkgs.callPackage ../pkgs/oizys/oizys-rs { };
oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { };
default = oizys-go;
});
oizysShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
git
deadnix
];
};
});
oizysChecks = forAllSystems (pkgs: import ./checks.nix { inherit pkgs inputs; });
oizysFormatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
oizysFlake = { oizysFlake = {
nixosModules = oizysModules; nixosModules = listToAttrs (findModulesList ../modules);
nixosConfigurations = oizysHosts; nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
packages = oizysPkg; packages = forAllSystems (pkgs: rec {
devShells = oizysShells; oizys-zig = pkgs.callPackage ../pkgs/oizys/oizys-zig { inherit zig2nix; };
formatter = oizysFormatter; oizys-nim = pkgs.callPackage ../pkgs/oizys/oizys-nim { };
checks = oizysChecks; oizys-rs = pkgs.callPackage ../pkgs/oizys/oizys-rs { };
# checks = forAllSystems (pkgs: { oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { };
# packageCheck = mkPackageCheck { default = oizys-go;
# inherit pkgs; });
# # make sure lix is in this? devShells = forAllSystems (pkgs: {
# packages = [ default = pkgs.mkShell {
# pkgs.pixi packages = with pkgs; [
# pkgs.swww git
# deadnix
# inputs.tsm.packages.${pkgs.system}.default ];
# inputs.hyprman.packages.${pkgs.system}.default };
# });
# inputs.roc.packages.${pkgs.system}.full checks = forAllSystems (pkgs: import ./checks.nix { inherit pkgs inputs; });
# inputs.roc.packages.${pkgs.system}.lang-server formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
#
# inputs.zls.outputs.packages.${pkgs.system}.default
# inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
# ];
#
# };
# });
}; };
} }