add attic packages to oizys packages

This commit is contained in:
Daylin Morgan 2025-01-19 18:21:44 -06:00
parent 7d9d0451a7
commit 4abe077029
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 32 additions and 26 deletions

View file

@ -1,7 +1,6 @@
inputs@{ inputs@{
nixpkgs, nixpkgs,
treefmt-nix, treefmt-nix,
lix-attic,
self, self,
... ...
}: }:
@ -11,7 +10,6 @@ let
inherit (builtins) mapAttrs readDir listToAttrs; inherit (builtins) mapAttrs readDir listToAttrs;
inherit (lib) inherit (lib)
genAttrs genAttrs
pkgFromSystem
loadOverlays loadOverlays
listify listify
enableAttrs enableAttrs
@ -34,15 +32,6 @@ let
) )
); );
inheritFlakePkgs =
pkgs: flakes:
listToAttrs (
map (name: {
inherit name;
value = pkgFromSystem pkgs.system name;
}) flakes
);
evalTreeFmt = evalTreeFmt =
pkgs: pkgs:
(treefmt-nix.lib.evalModule pkgs ( (treefmt-nix.lib.evalModule pkgs (
@ -60,12 +49,6 @@ let
} }
)); ));
lixAtticPackages = pkgs:
{ attic-client = lix-attic.packages.${pkgs.system}.attic-client;
attic-server = lix-attic.packages.${pkgs.system}.attic-server;
};
oizysFlake = { oizysFlake = {
templates = { templates = {
dev = { dev = {
@ -82,15 +65,10 @@ let
default = oizys; default = oizys;
oizys = pkgs.callPackage ../pkgs/oizys { }; oizys = pkgs.callPackage ../pkgs/oizys { };
iso = mkIso.config.system.build.isoImage; iso = mkIso.config.system.build.isoImage;
lix = pkgFromSystem pkgs.system "lix-module";
# nimlangserver = pkgs.callPackage ../pkgs/nim/nimlangserver { };
} }
// (inheritFlakePkgs pkgs [ // (import ../pkgs { inherit pkgs lib; })
"pixi"
"f1multiviewer"
"tsm"
])
// (import ../pkgs { inherit pkgs; })
// (lixAtticPackages pkgs)
); );
devShells = forAllSystems (pkgs: { devShells = forAllSystems (pkgs: {

View file

@ -104,6 +104,16 @@ let
# listNixFilesRecursive = dir: filterNotDefaultNixFile (listFilesRecursive dir); # listNixFilesRecursive = dir: filterNotDefaultNixFile (listFilesRecursive dir);
listNixFilesRecursive = dir: dir |> listFilesRecursive |> filterNotDefaultNixFile; listNixFilesRecursive = dir: dir |> listFilesRecursive |> filterNotDefaultNixFile;
## convert a list of flakes to { name = packageAttr; }
flakesToPackagesAttrs =
system: flakes:
listToAttrs (
map (name: {
inherit name;
value = pkgFromSystem system name;
}) flakes
);
# defaultLinuxPackage = flake: flake.packages.x86_64-linux.default; # defaultLinuxPackage = flake: flake.packages.x86_64-linux.default;
# defaultPackageGeneric = system: flake: "${flake}.packages.${system}.default"; # defaultPackageGeneric = system: flake: "${flake}.packages.${system}.default";
pkgsFromSystem = system: flake: inputs."${flake}".packages."${system}"; pkgsFromSystem = system: flake: inputs."${flake}".packages."${system}";
@ -199,5 +209,6 @@ in
hostFiles hostFiles
oizysSettings oizysSettings
tryPkgsFromFile tryPkgsFromFile
flakesToPackagesAttrs
; ;
} }

View file

@ -1,4 +1,12 @@
{ pkgs, ... }: {
pkgs,
lib,
...
}:
let
inherit (lib) flakesToPackageAttrs flakeFromSystem;
flake = flakeFromSystem pkgs.system;
in
{ {
nimlangserver = pkgs.callPackage ./nim/nimlangserver { }; nimlangserver = pkgs.callPackage ./nim/nimlangserver { };
procs = pkgs.callPackage ./nim/procs { }; procs = pkgs.callPackage ./nim/procs { };
@ -7,4 +15,13 @@
distrobox = pkgs.callPackage ./distrobox { }; distrobox = pkgs.callPackage ./distrobox { };
llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins { }; llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins { };
attic-client = (flake.pkgs "lix-attic").attic-client;
attic-server = (flake.pkgs "lix-attic").attic-server;
lix = (flake.pkgs "lix-module").default;
} }
# // (flakesToPackageAttrs [
# "pixi"
# "f1multiviewer"
# "tsm"
# ])