diff --git a/home/gyroflow/home.nix b/home/gyroflow/home.nix index a0e708a1..afdb7ee4 100644 --- a/home/gyroflow/home.nix +++ b/home/gyroflow/home.nix @@ -4,8 +4,5 @@ , ... }: with lib; let cfg = config.passthrough.gyroflow; in mkIf cfg.enable { - home.packages = with pkgs; [ (pkgs.callPackage ./package { - inherit (pkgs.qt6) wrapQtAppsHook qmake - qtbase qtsvg qtwayland qtvirtualkeyboard qtdeclarative; - }) ]; + home.packages = with pkgs; [ gyroflow ]; } diff --git a/home/util/home.nix b/home/util/home.nix index fe8f690a..7daeddf5 100644 --- a/home/util/home.nix +++ b/home/util/home.nix @@ -15,7 +15,7 @@ betaflight-configurator inav-configurator inav-blackbox-tools - (pkgs.callPackage ./package/blheli32.nix { }) - (pkgs.callPackage ./package/expresslrs.nix { }) + blhelisuite32 + expresslrs-configurator ]; } diff --git a/home/util/package/blheli32.nix b/package/blhelisuite32/default.nix similarity index 100% rename from home/util/package/blheli32.nix rename to package/blhelisuite32/default.nix diff --git a/package/default.nix b/package/default.nix new file mode 100644 index 00000000..38b64d27 --- /dev/null +++ b/package/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: { + nixpkgs.overlays = [ (final: prev: + builtins.listToAttrs (map (pkg: { + name = pkg; + value = let + argsPath = ./${pkg}/args.nix; + in final.callPackage ./${pkg} + (if (builtins.pathExists argsPath) then + (import argsPath final) + else { }); + }) (builtins.attrNames (builtins.readDir ./.))) + ) ]; +} diff --git a/home/util/package/expresslrs.nix b/package/expresslrs-configurator/default.nix similarity index 100% rename from home/util/package/expresslrs.nix rename to package/expresslrs-configurator/default.nix diff --git a/package/gyroflow/args.nix b/package/gyroflow/args.nix new file mode 100644 index 00000000..cfbddb63 --- /dev/null +++ b/package/gyroflow/args.nix @@ -0,0 +1,4 @@ +pkgs: { + inherit (pkgs.qt6) wrapQtAppsHook qmake + qtbase qtsvg qtwayland qtvirtualkeyboard qtdeclarative; +} diff --git a/home/gyroflow/package/crash-dump.patch b/package/gyroflow/crash-dump.patch similarity index 100% rename from home/gyroflow/package/crash-dump.patch rename to package/gyroflow/crash-dump.patch diff --git a/home/gyroflow/package/default.nix b/package/gyroflow/default.nix similarity index 100% rename from home/gyroflow/package/default.nix rename to package/gyroflow/default.nix diff --git a/home/gyroflow/package/mdk-log.patch b/package/gyroflow/mdk-log.patch similarity index 100% rename from home/gyroflow/package/mdk-log.patch rename to package/gyroflow/mdk-log.patch diff --git a/spec/default.nix b/spec/default.nix index 67555689..fe88c033 100644 --- a/spec/default.nix +++ b/spec/default.nix @@ -7,6 +7,7 @@ ../global ../home/profile.nix ../home/user.nix + ../package ./constant.nix ./channel.nix impermanence.nixosModules.impermanence