mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 18:30:43 -06:00
make styx a "build styx" function
This commit is contained in:
parent
c87b8487ed
commit
ab7ee89eda
2 changed files with 5 additions and 5 deletions
|
@ -35,10 +35,10 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
lib = import ./lib {inherit inputs nixpkgs;};
|
lib = import ./lib {inherit inputs nixpkgs;};
|
||||||
inherit (lib) findModules mapHosts shToPkg;
|
inherit (lib) findModules mapHosts buildStyx;
|
||||||
in {
|
in {
|
||||||
nixosModules = findModules ./modules;
|
nixosModules = findModules ./modules;
|
||||||
nixosConfigurations = mapHosts ./hosts;
|
nixosConfigurations = mapHosts ./hosts;
|
||||||
packages = shToPkg ./styx;
|
packages = buildStyx {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
in rec {
|
in rec {
|
||||||
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
|
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
shToPkg = path:
|
buildStyx = _:
|
||||||
forAllSystems (
|
forAllSystems (
|
||||||
pkgs: let
|
pkgs: let
|
||||||
name = baseNameOf path;
|
name = baseNameOf ../styx;
|
||||||
in {${name} = pkgs.writeScriptBin name (readFile path);}
|
in {${name} = pkgs.writeScriptBin name (readFile ../styx);}
|
||||||
);
|
);
|
||||||
|
|
||||||
isNixFile = path: hasSuffix ".nix" path;
|
isNixFile = path: hasSuffix ".nix" path;
|
||||||
|
|
Loading…
Reference in a new issue