refactor(flake): move custom packages to overlay

This commit is contained in:
2026-10-12 11:13:20 -04:00
parent 6532a822cd
commit 022e284996
8 changed files with 83 additions and 31 deletions

View File

@@ -5,7 +5,18 @@
root,
system,
}:
let
overlay = import ./overlay.nix { inherit root; };
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ overlay ];
};
in
{
overlays.default = overlay;
packages.${system} = pkgs.alexion;
nixosConfigurations = import ../dotfiles {
inherit
inputs

7
src/flake/overlay.nix Normal file
View File

@@ -0,0 +1,7 @@
{ root }:
final: _prev: {
alexion = import ./packages {
pkgs = final;
inherit root;
};
}

View File

@@ -0,0 +1,8 @@
{ pkgs, root }:
{
pi-coding-agent = pkgs.callPackage ./pi-coding-agent.nix {
inherit root;
};
waybar = pkgs.callPackage ./waybar.nix { };
}

View File

@@ -0,0 +1,8 @@
{
pi-coding-agent,
root,
}:
pi-coding-agent.overrideAttrs {
src = root + "/third_party/pi";
patches = [ ];
}

View File

@@ -0,0 +1,28 @@
{
fetchFromGitHub,
waybar,
}:
waybar.overrideAttrs {
src = fetchFromGitHub {
owner = "Alexays";
repo = "Waybar";
rev = "05945748dccce28bf96d26d8f64a9e69a8dd49ba";
hash = "sha256-51R3mIt8cLNvh/X5qe9vOqeJCj0U9KRyemVE5y+OhiU=";
};
postUnpack =
let
libcava = fetchFromGitHub {
owner = "LukashonakV";
repo = "cava";
tag = "0.10.7";
hash = "sha256-zkyj1vBzHtoypX4Bxdh1Vmwh967DKKxN751v79hzmgQ=";
};
in
''
pushd "$sourceRoot"
cp -R --no-preserve=mode,ownership ${libcava} subprojects/cava-0.10.7
patchShebangs .
popd
'';
}