refactor(flake): move custom packages to overlay #178

Merged
alexion merged 1 commits from refactor/flake-package-overlays into main 2026-10-12 11:37:56 -04:00
Owner

Summary

  • Add a flake overlay that exposes repository packages under pkgs.alexion.
  • Move custom Waybar packaging into src/flake/packages/waybar.nix.
  • Move vendored Pi packaging into src/flake/packages/pi-coding-agent.nix.
  • Add package options to the Waybar and Pi modules.

Verification

  • nix eval --raw '.#packages.x86_64-linux.waybar.name'
  • nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'
  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'
  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.pi-coding-agent.package.name'
  • nix run .#fix
  • bazel run //src/natu:natu -- src/flake/default.nix src/flake/overlay.nix src/flake/packages/default.nix src/flake/packages/waybar.nix src/flake/packages/pi-coding-agent.nix src/dotfiles/hosts.nix configs/nixos/modules/desktop/session/waybar.nix configs/nixos/modules/shell/pi/default.nix
## Summary - Add a flake overlay that exposes repository packages under `pkgs.alexion`. - Move custom Waybar packaging into `src/flake/packages/waybar.nix`. - Move vendored Pi packaging into `src/flake/packages/pi-coding-agent.nix`. - Add package options to the Waybar and Pi modules. ## Verification - `nix eval --raw '.#packages.x86_64-linux.waybar.name'` - `nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'` - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'` - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.pi-coding-agent.package.name'` - `nix run .#fix` - `bazel run //src/natu:natu -- src/flake/default.nix src/flake/overlay.nix src/flake/packages/default.nix src/flake/packages/waybar.nix src/flake/packages/pi-coding-agent.nix src/dotfiles/hosts.nix configs/nixos/modules/desktop/session/waybar.nix configs/nixos/modules/shell/pi/default.nix`
Author
Owner

Follow-up correction:

  • Remove the Waybar and Pi package override options.
  • Use pkgs.alexion.waybar and pkgs.alexion.pi-coding-agent directly in their modules.
  • Keep package selection centralized in the overlay instead of exposing per-module override hooks.

Verification:

  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'
  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.pi-coding-agent.package.name'
  • nix run .#fix
  • bazel run //src/natu:natu -- configs/nixos/modules/desktop/session/waybar.nix configs/nixos/modules/shell/pi/default.nix
Follow-up correction: - Remove the Waybar and Pi package override options. - Use `pkgs.alexion.waybar` and `pkgs.alexion.pi-coding-agent` directly in their modules. - Keep package selection centralized in the overlay instead of exposing per-module override hooks. Verification: - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'` - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.pi-coding-agent.package.name'` - `nix run .#fix` - `bazel run //src/natu:natu -- configs/nixos/modules/desktop/session/waybar.nix configs/nixos/modules/shell/pi/default.nix`
Author
Owner

Follow-up correction:

  • Move the custom package overlay from host-only wiring into shared repository modules.
  • Let host and guest interiors receive pkgs.alexion through the same module import path.
  • Remove the host-specific overlay module from hosts.nix.

Verification:

  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'
  • nix eval --json --impure --expr '<guest module import wiring check>'
  • nix run .#fix
  • bazel run //src/natu:natu -- src/dotfiles/default.nix src/dotfiles/hosts.nix
Follow-up correction: - Move the custom package overlay from host-only wiring into shared repository modules. - Let host and guest interiors receive `pkgs.alexion` through the same module import path. - Remove the host-specific overlay module from `hosts.nix`. Verification: - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'` - `nix eval --json --impure --expr '<guest module import wiring check>'` - `nix run .#fix` - `bazel run //src/natu:natu -- src/dotfiles/default.nix src/dotfiles/hosts.nix`
Author
Owner

Follow-up correction:

  • Inline the custom package overlay in src/flake/default.nix.
  • Remove the separate src/flake/overlay.nix file.

Verification:

  • nix eval --raw '.#packages.x86_64-linux.waybar.name'
  • nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'
  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'
  • nix run .#fix
  • bazel run //src/natu:natu -- src/flake/default.nix src/flake/packages/default.nix src/flake/packages/waybar.nix src/flake/packages/pi-coding-agent.nix
Follow-up correction: - Inline the custom package overlay in `src/flake/default.nix`. - Remove the separate `src/flake/overlay.nix` file. Verification: - `nix eval --raw '.#packages.x86_64-linux.waybar.name'` - `nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'` - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'` - `nix run .#fix` - `bazel run //src/natu:natu -- src/flake/default.nix src/flake/packages/default.nix src/flake/packages/waybar.nix src/flake/packages/pi-coding-agent.nix`
Author
Owner

Follow-up correction:

  • Remove the overlay and pkgs let bindings from src/flake/default.nix.
  • Define overlays.default directly in the output attrset.
  • Build packages.${system} by importing nixpkgs with self.overlays.default.

Verification:

  • nix eval --raw '.#packages.x86_64-linux.waybar.name'
  • nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'
  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'
  • nix run .#fix
  • bazel run //src/natu:natu -- src/flake/default.nix
Follow-up correction: - Remove the `overlay` and `pkgs` let bindings from `src/flake/default.nix`. - Define `overlays.default` directly in the output attrset. - Build `packages.${system}` by importing nixpkgs with `self.overlays.default`. Verification: - `nix eval --raw '.#packages.x86_64-linux.waybar.name'` - `nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'` - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'` - `nix run .#fix` - `bazel run //src/natu:natu -- src/flake/default.nix`
Author
Owner

Follow-up correction:

  • Rename the flake overlay from overlays.default to overlays.custom.
  • Update package output construction and shared module wiring to use self.overlays.custom.

Verification:

  • nix eval --raw '.#packages.x86_64-linux.waybar.name'
  • nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'
  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'
  • nix run .#fix
  • bazel run //src/natu:natu -- src/flake/default.nix src/dotfiles/default.nix
Follow-up correction: - Rename the flake overlay from `overlays.default` to `overlays.custom`. - Update package output construction and shared module wiring to use `self.overlays.custom`. Verification: - `nix eval --raw '.#packages.x86_64-linux.waybar.name'` - `nix eval --raw '.#packages.x86_64-linux.pi-coding-agent.name'` - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.waybar.package.name'` - `nix run .#fix` - `bazel run //src/natu:natu -- src/flake/default.nix src/dotfiles/default.nix`
alexion added 1 commit 2026-10-12 11:34:20 -04:00
alexion force-pushed refactor/flake-package-overlays from a6e1a50e20 to 5ee328cdf8 2026-10-12 11:34:20 -04:00 Compare
alexion merged commit 5ee328cdf8 into main 2026-10-12 11:37:56 -04:00
alexion deleted branch refactor/flake-package-overlays 2026-10-12 11:37:56 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dev#178