2024-05-06 14:32:00 -05:00
|
|
|
inputs:
|
|
|
|
let
|
2024-05-13 16:31:10 -05:00
|
|
|
inherit (inputs) nixpkgs self zig2nix;
|
2024-03-01 00:26:52 -06:00
|
|
|
lib = nixpkgs.lib.extend (import ./extended.nix);
|
|
|
|
|
2024-05-06 14:32:00 -05:00
|
|
|
inherit (builtins)
|
|
|
|
mapAttrs
|
|
|
|
readDir
|
|
|
|
filter
|
|
|
|
listToAttrs
|
|
|
|
;
|
|
|
|
inherit (lib)
|
|
|
|
nixosSystem
|
|
|
|
genAttrs
|
|
|
|
isNixFile
|
|
|
|
mkDefaultOizysModule
|
|
|
|
mkOizysModule
|
|
|
|
enabled
|
|
|
|
;
|
2024-03-01 00:26:52 -06:00
|
|
|
inherit (lib.filesystem) listFilesRecursive;
|
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-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" ];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
|
2024-02-27 10:41:27 -06:00
|
|
|
|
2024-03-20 10:43:35 -05:00
|
|
|
nixosModules = listToAttrs (findModulesList ../modules);
|
2024-01-24 14:12:52 -06:00
|
|
|
|
2024-06-14 11:54:03 -05:00
|
|
|
mkPackageCheck =
|
|
|
|
{ packages, pkgs }:
|
|
|
|
pkgs.runCommandLocal "build-third-party"
|
|
|
|
{
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = [ packages ];
|
|
|
|
}
|
|
|
|
''
|
|
|
|
mkdir "$out"
|
|
|
|
'';
|
|
|
|
|
2024-05-06 14:32:00 -05:00
|
|
|
mkSystem =
|
2024-05-12 14:50:33 -05:00
|
|
|
hostName:
|
2024-01-23 11:51:13 -06:00
|
|
|
nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-12 14:50:33 -05:00
|
|
|
modules = [
|
|
|
|
../modules/oizys.nix
|
|
|
|
../overlays
|
|
|
|
inputs.lix-module.nixosModules.default
|
|
|
|
] ++ filter isNixFile (listFilesRecursive (../. + "/hosts/${hostName}"));
|
2024-02-15 10:57:13 -06:00
|
|
|
|
2024-05-06 14:32:00 -05:00
|
|
|
specialArgs = {
|
|
|
|
inherit
|
|
|
|
inputs
|
|
|
|
lib
|
|
|
|
self
|
|
|
|
mkDefaultOizysModule
|
|
|
|
mkOizysModule
|
|
|
|
enabled
|
2024-05-12 14:50:33 -05:00
|
|
|
hostName
|
2024-05-06 14:32:00 -05:00
|
|
|
;
|
|
|
|
};
|
2024-01-23 11:51:13 -06:00
|
|
|
};
|
2024-03-20 10:43:35 -05:00
|
|
|
|
|
|
|
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
2024-05-06 14:32:00 -05:00
|
|
|
oizysPkg = forAllSystems (pkgs: rec {
|
2024-05-13 16:31:10 -05:00
|
|
|
oizys-zig = pkgs.callPackage ../pkgs/oizys/oizys-zig { inherit zig2nix; };
|
2024-05-06 14:32:00 -05:00
|
|
|
oizys-nim = pkgs.callPackage ../pkgs/oizys/oizys-nim { };
|
|
|
|
oizys-rs = pkgs.callPackage ../pkgs/oizys/oizys-rs { };
|
|
|
|
oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { };
|
2024-05-14 12:23:13 -05:00
|
|
|
default = oizys-go;
|
2024-05-06 14:32:00 -05:00
|
|
|
});
|
|
|
|
devShells = forAllSystems (pkgs: {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
packages = with pkgs; [
|
|
|
|
git
|
|
|
|
deadnix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
2024-02-21 14:36:33 -06:00
|
|
|
|
2024-03-21 11:06:07 -05:00
|
|
|
oizysFlake = {
|
2024-03-20 10:43:35 -05:00
|
|
|
nixosModules = nixosModules;
|
|
|
|
nixosConfigurations = oizysHosts;
|
|
|
|
packages = oizysPkg;
|
|
|
|
devShells = devShells;
|
2024-05-06 14:32:00 -05:00
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
2024-06-14 11:54:03 -05:00
|
|
|
checks = forAllSystems (pkgs: {
|
|
|
|
packageCheck = mkPackageCheck {
|
|
|
|
inherit pkgs;
|
|
|
|
# make sure lix is in this?
|
|
|
|
packages = [
|
|
|
|
pkgs.pixi
|
|
|
|
pkgs.swww
|
|
|
|
|
|
|
|
inputs.roc.packages.${pkgs.system}.full
|
|
|
|
inputs.roc.packages.${pkgs.system}.lang-server
|
2024-06-14 12:17:39 -05:00
|
|
|
|
|
|
|
inputs.zls.outputs.packages.${pkgs.system}.default
|
|
|
|
inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
|
2024-06-14 11:54:03 -05:00
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
2024-02-21 14:36:33 -06:00
|
|
|
};
|
2024-01-23 11:51:13 -06:00
|
|
|
}
|