mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
wip: continue migration
This commit is contained in:
parent
7ce27d5d2f
commit
fa9bd32b0b
129 changed files with 6252 additions and 106 deletions
58
aspects/nixpkgs.nix
Normal file
58
aspects/nixpkgs.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue