fix: share pkgs & overlays with home-manager

This commit is contained in:
Felix Schröter 2025-05-18 19:30:30 +02:00
parent a04fca65d8
commit f25ca7a488
Signed by: felschr
GPG key ID: 671E39E6744C807D
11 changed files with 74 additions and 63 deletions

27
overlays/flake-module.nix Normal file
View file

@ -0,0 +1,27 @@
{ self, inputs, ... }:
{
flake = {
overlays.default = final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (prev) system;
config.allowUnfree = true;
};
inherit (inputs.self.packages.${prev.system}) deconz brlaser;
vimPlugins = prev.vimPlugins // final.callPackage ../pkgs/vim-plugins { inherit inputs; };
};
pkgsFor =
system:
import inputs.nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
config.allowUnfree = true;
};
};
perSystem =
{ system, ... }:
{
_module.args.pkgs = self.pkgsFor system;
};
}