aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-04-24 19:56:27 -0700
committerFranck Cuny <franck@fcuny.net>2025-04-24 19:56:27 -0700
commitddfc6cef59f47d6e3713acae619dda1ca4740ed0 (patch)
treebcc7e1a1cbb2bebc4c03ab596adf340f0fca3bdf /flake.nix
parentadd more shell aliases for nix commands (diff)
downloadinfra-ddfc6cef59f47d6e3713acae619dda1ca4740ed0.tar.gz
build python packages for llm
To get a more recent version of the llm python tool and the anthropic module, we need to build the packages ourselves. Refactor how we're building overlays to make it easier to add new packages using the `pkgsUnstable` set.
Diffstat (limited to '')
-rw-r--r--flake.nix24
1 files changed, 22 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 9d51051..ac1179c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,6 +4,8 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
+ nixpkgsUnstable.url = "github:nixos/nixpkgs/nixos-unstable";
+
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
@@ -29,6 +31,7 @@
outputs =
{
nixpkgs,
+ nixpkgsUnstable,
darwin,
treefmt-nix,
pre-commit-hooks,
@@ -37,7 +40,24 @@
let
system = "aarch64-darwin";
pkgs = import nixpkgs { inherit system; };
- mkSystem = import ./nix/lib/mkSystem.nix { inherit nixpkgs inputs; };
+ pkgsUnstable = import nixpkgsUnstable { inherit system; };
+
+ # Define overlays here
+ overlays = [
+ (final: _prev: {
+ sapi = final.callPackage ./pkgs/sapi { };
+ hashi = final.callPackage ./pkgs/hashi { };
+ llmPython = final.callPackage ./pkgs/llmPython {
+ inherit pkgsUnstable;
+ };
+ })
+ ];
+
+ mkSystem = import ./nix/lib/mkSystem.nix {
+ inherit nixpkgs nixpkgsUnstable inputs;
+ inherit overlays;
+ };
+
treefmtEval = treefmt-nix.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs = {
@@ -91,7 +111,7 @@
git
(writeScriptBin "nbuild" ''
set -e
- echo "> Running darwin-rebuild switch..."
+ echo "> Running darwin-rebuild build..."
${inputs.darwin.packages.${system}.darwin-rebuild}/bin/darwin-rebuild build --flake .
echo "> darwin-rebuild build was successful ✅"
echo "> macOS config was successfully applied 🚀"