diff --git a/flake.nix b/flake.nix index 7f32d55..60b776e 100644 --- a/flake.nix +++ b/flake.nix @@ -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 {}; }; } diff --git a/lib/default.nix b/lib/default.nix index f27a90a..d129da0 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -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;