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 { in rec {
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system}); forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
buildOizys = _: nixosModules = listToAttrs (findModulesList ../modules);
forAllSystems (
pkgs: let
pkg = pkgs.callPackage ../oizys {};
in {
oizys = pkg;
default = pkg;
}
);
mkSystem = hostname: mkSystem = hostname:
nixosSystem { nixosSystem {
@ -39,13 +31,29 @@ in rec {
specialArgs = {inherit inputs lib self;}; 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 = _: { oizysFlake = _: {
nixosModules = findModules {}; nixosModules = nixosModules;
nixosConfigurations = mapHosts ../hosts; nixosConfigurations = oizysHosts;
packages = buildOizys {}; packages = oizysPkg;
devShells = devShells;
formatter = forAllSystems (pkgs: pkgs.alejandra); formatter = forAllSystems (pkgs: pkgs.alejandra);
}; };
} }