refactor(flake): move custom packages to overlay
This commit is contained in:
@@ -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
7
src/flake/overlay.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ root }:
|
||||
final: _prev: {
|
||||
alexion = import ./packages {
|
||||
pkgs = final;
|
||||
inherit root;
|
||||
};
|
||||
}
|
||||
8
src/flake/packages/default.nix
Normal file
8
src/flake/packages/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs, root }:
|
||||
{
|
||||
pi-coding-agent = pkgs.callPackage ./pi-coding-agent.nix {
|
||||
inherit root;
|
||||
};
|
||||
|
||||
waybar = pkgs.callPackage ./waybar.nix { };
|
||||
}
|
||||
8
src/flake/packages/pi-coding-agent.nix
Normal file
8
src/flake/packages/pi-coding-agent.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
pi-coding-agent,
|
||||
root,
|
||||
}:
|
||||
pi-coding-agent.overrideAttrs {
|
||||
src = root + "/third_party/pi";
|
||||
patches = [ ];
|
||||
}
|
||||
28
src/flake/packages/waybar.nix
Normal file
28
src/flake/packages/waybar.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user