wip: continue migration

This commit is contained in:
Leon Schwarzäugl 2026-04-03 22:55:16 +02:00
parent 7ce27d5d2f
commit fa9bd32b0b
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
129 changed files with 6252 additions and 106 deletions

58
aspects/nixpkgs.nix Normal file
View file

@ -0,0 +1,58 @@
{ self, den, lib, ... }:
let
nixpkgsModule = from:
let
config = if (from ? host) then from.host else if (from ? home) then from.home else { };
in
{
nixpkgs = {
overlays = [
self.outputs.overlays.default
self.outputs.overlays.stables
self.outputs.overlays.modifications
] ++ lib.optionals ((from ? user) || (from ? home)) [
(final: prev:
let
additions = final: _: import "${self}/pkgs/config" {
inherit self config lib;
pkgs = final;
homeConfig = if (from ? user) then from.user else if (from ? home) then from.home else { };
};
in
additions final prev
)
];
config = lib.mkIf (!config.isMicroVM) {
allowUnfree = true;
};
};
};
hostAspect =
{ host }:
{
${host.class} = nixpkgsModule { inherit host; };
};
hostUserAspect =
{ host, user }:
{
${host.class} = nixpkgsModule { inherit host user; };
};
homeAspect =
{ home }:
{
${home.class} = nixpkgsModule { inherit home; };
};
in
{
den.provides.nixpkgs = den.lib.parametric.exactly {
includes = [
hostAspect
hostUserAspect
homeAspect
];
};
}