refactor(flake): centralize custom packages
This commit was merged in pull request #178.
This commit is contained in:
@@ -30,32 +30,7 @@ in
|
|||||||
|
|
||||||
home-manager.users.${config.user.name}.programs.waybar = {
|
home-manager.users.${config.user.name}.programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Waybar 0.15.0 sends old Hyprland workspace dispatch commands.
|
package = pkgs.alexion.waybar;
|
||||||
# Use the fix commit until a release includes upstream PR #5013.
|
|
||||||
package = pkgs.waybar.overrideAttrs {
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "Alexays";
|
|
||||||
repo = "Waybar";
|
|
||||||
rev = "05945748dccce28bf96d26d8f64a9e69a8dd49ba";
|
|
||||||
hash = "sha256-51R3mIt8cLNvh/X5qe9vOqeJCj0U9KRyemVE5y+OhiU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
postUnpack =
|
|
||||||
let
|
|
||||||
libcava = pkgs.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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# A user service bound to graphical-session.target, which uwsm activates,
|
# A user service bound to graphical-session.target, which uwsm activates,
|
||||||
# so the bar comes up with the session and no compositor exec-once.
|
# so the bar comes up with the session and no compositor exec-once.
|
||||||
|
|||||||
@@ -12,18 +12,14 @@ let
|
|||||||
piDir = "${config.users.users.${user}.home}/.pi/agent";
|
piDir = "${config.users.users.${user}.home}/.pi/agent";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.shell.pi = {
|
options.modules.shell.pi.enable =
|
||||||
enable = lib.mkEnableOption "Pi, a terminal coding agent, configured through home-manager";
|
lib.mkEnableOption "Pi, a terminal coding agent, configured through home-manager";
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.modules.shell.pi.enable {
|
config = lib.mkIf config.modules.shell.pi.enable {
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
programs.pi-coding-agent = {
|
programs.pi-coding-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pi-coding-agent.overrideAttrs {
|
package = pkgs.alexion.pi-coding-agent;
|
||||||
src = ../../../../../third_party/pi;
|
|
||||||
patches = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
defaultProvider = "openai-codex";
|
defaultProvider = "openai-codex";
|
||||||
|
|||||||
@@ -33,7 +33,12 @@ let
|
|||||||
repositoryModules = modules;
|
repositoryModules = modules;
|
||||||
root = root + "/guests";
|
root = root + "/guests";
|
||||||
};
|
};
|
||||||
modules.imports = util.collectNixFiles (root + "/modules");
|
modules.imports = [
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ self.overlays.custom ];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ util.collectNixFiles (root + "/modules");
|
||||||
|
|
||||||
in
|
in
|
||||||
import ./hosts.nix {
|
import ./hosts.nix {
|
||||||
|
|||||||
@@ -6,6 +6,19 @@
|
|||||||
system,
|
system,
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
overlays.custom = final: _prev: {
|
||||||
|
alexion = import ./packages {
|
||||||
|
pkgs = final;
|
||||||
|
inherit root;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
packages.${system} =
|
||||||
|
(import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ self.overlays.custom ];
|
||||||
|
}).alexion;
|
||||||
|
|
||||||
nixosConfigurations = import ../dotfiles {
|
nixosConfigurations = import ../dotfiles {
|
||||||
inherit
|
inherit
|
||||||
inputs
|
inputs
|
||||||
|
|||||||
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