From ab7ee89eda9ca643aac0bda55f740f63083c3656 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 26 Jan 2024 12:00:05 -0600 Subject: [PATCH] make styx a "build styx" function --- flake.nix | 4 ++-- lib/default.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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;