refactor(flake)!: export packages using a flake module

Also stop passing `outputs` around, prefer `inputs.self`
Also put all `auto_` in `readOnly` `internal` options
- `autoModules`, `autoConfigurations` and `autoPackages`
Do not export packages as overlay (causes an infinite recursion)
- this is documented on the two places it has effect on
-- in `./overlays/default.nix` and `./modules/flake/configurations.nix`
-- in `autoConfigurations` we manually extend `pkgs` with the flake packages
Allow packages to say what `systems` they are compatible with
- See `./pkgs/swww/systems.nix` - disabled for all systems
- See `./pkgs/pngpaste/systems.nix` - enabled only for `darwin` targets
This commit is contained in:
reo101 2024-07-29 01:35:14 +03:00
parent e45db02cd5
commit 2941536b80
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
36 changed files with 241 additions and 118 deletions

View file

@ -1,10 +1,9 @@
# This file defines overlays
{ inputs, ... }:
{
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs {
pkgs = final;
};
# This one brings our custom packages
# BUG: causes infinite recursion
# additions = final: prev: inputs.self.packages.${prev.system};
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
@ -30,7 +29,7 @@
};
};
nix-monitored = inputs.nix-monitored.packages.${final.system}.default.override {
nix-monitored = inputs.nix-monitored.packages.${prev.system}.default.override {
nix = prev.nix;
nix-output-monitor = prev.nix-output-monitor;
};