make styx a "build styx" function

This commit is contained in:
Daylin Morgan 2024-01-26 12:00:05 -06:00
parent c87b8487ed
commit ab7ee89eda
Signed by: daylin
GPG Key ID: C1E52E7DD81DF79F
2 changed files with 5 additions and 5 deletions

View File

@ -35,10 +35,10 @@
...
}: let
lib = import ./lib {inherit inputs nixpkgs;};
inherit (lib) findModules mapHosts shToPkg;
inherit (lib) findModules mapHosts buildStyx;
in {
nixosModules = findModules ./modules;
nixosConfigurations = mapHosts ./hosts;
packages = shToPkg ./styx;
packages = buildStyx {};
};
}

View File

@ -11,11 +11,11 @@
in rec {
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
shToPkg = path:
buildStyx = _:
forAllSystems (
pkgs: let
name = baseNameOf path;
in {${name} = pkgs.writeScriptBin name (readFile path);}
name = baseNameOf ../styx;
in {${name} = pkgs.writeScriptBin name (readFile ../styx);}
);
isNixFile = path: hasSuffix ".nix" path;