remove noop functions and add devshell

This commit is contained in:
Daylin Morgan 2024-03-20 10:43:35 -05:00
parent 4a8eb8bf0b
commit 4b8b1718a4
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -15,15 +15,7 @@
in rec {
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
buildOizys = _:
forAllSystems (
pkgs: let
pkg = pkgs.callPackage ../oizys {};
in {
oizys = pkg;
default = pkg;
}
);
nixosModules = listToAttrs (findModulesList ../modules);
mkSystem = hostname:
nixosSystem {
@ -39,13 +31,29 @@ in rec {
specialArgs = {inherit inputs lib self;};
};
mapHosts = dir: mapAttrs (name: _: mkSystem name) (readDir dir);
findModules = _: listToAttrs (findModulesList ../modules);
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
oizysPkg = forAllSystems (
pkgs: let
pkg = pkgs.callPackage ../oizys {};
in {
oizys = pkg;
default = pkg;
}
);
devShells = forAllSystems (
pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [git deadnix];
};
}
);
oizysFlake = _: {
nixosModules = findModules {};
nixosConfigurations = mapHosts ../hosts;
packages = buildOizys {};
nixosModules = nixosModules;
nixosConfigurations = oizysHosts;
packages = oizysPkg;
devShells = devShells;
formatter = forAllSystems (pkgs: pkgs.alejandra);
};
}