mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 06:00:45 -06:00
refactor oizysFlake
This commit is contained in:
parent
097dc5677f
commit
97084f9c08
1 changed files with 24 additions and 48 deletions
|
@ -22,10 +22,8 @@ let
|
|||
inherit (import ./find-modules.nix { inherit lib; }) findModulesList;
|
||||
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
in
|
||||
rec {
|
||||
|
||||
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
|
||||
oizysModules = listToAttrs (findModulesList ../modules);
|
||||
|
||||
mkSystem =
|
||||
hostName:
|
||||
|
@ -50,51 +48,29 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||
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);
|
||||
in
|
||||
{
|
||||
oizysFlake = {
|
||||
nixosModules = oizysModules;
|
||||
nixosConfigurations = oizysHosts;
|
||||
packages = oizysPkg;
|
||||
devShells = oizysShells;
|
||||
formatter = oizysFormatter;
|
||||
checks = oizysChecks;
|
||||
# checks = forAllSystems (pkgs: {
|
||||
# packageCheck = mkPackageCheck {
|
||||
# inherit pkgs;
|
||||
# # make sure lix is in this?
|
||||
# packages = [
|
||||
# pkgs.pixi
|
||||
# pkgs.swww
|
||||
#
|
||||
# inputs.tsm.packages.${pkgs.system}.default
|
||||
# inputs.hyprman.packages.${pkgs.system}.default
|
||||
#
|
||||
# inputs.roc.packages.${pkgs.system}.full
|
||||
# inputs.roc.packages.${pkgs.system}.lang-server
|
||||
#
|
||||
# inputs.zls.outputs.packages.${pkgs.system}.default
|
||||
# inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
|
||||
# ];
|
||||
#
|
||||
# };
|
||||
# });
|
||||
nixosModules = listToAttrs (findModulesList ../modules);
|
||||
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||
packages = 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;
|
||||
});
|
||||
devShells = forAllSystems (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
git
|
||||
deadnix
|
||||
];
|
||||
};
|
||||
});
|
||||
checks = forAllSystems (pkgs: import ./checks.nix { inherit pkgs inputs; });
|
||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue