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

View file

@ -104,6 +104,16 @@ let
# listNixFilesRecursive = dir: filterNotDefaultNixFile (listFilesRecursive dir);
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;
# defaultPackageGeneric = system: flake: "${flake}.packages.${system}.default";
pkgsFromSystem = system: flake: inputs."${flake}".packages."${system}";
@ -199,5 +209,6 @@ in
hostFiles
oizysSettings
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 { };
procs = pkgs.callPackage ./nim/procs { };
@ -7,4 +15,13 @@
distrobox = pkgs.callPackage ./distrobox { };
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"
# ])