nixfiles/registries/flake.nix
Sebastian Walz 9f7b02e1cd
Tohu vaBohu
2023-04-03 14:38:02 +02:00

87 lines
3.0 KiB
Nix

{
description = "Packages";
inputs
= {
fork-awesome.url = "github:sivizius/nixfiles/development?dir=packages/fork-awesome";
libconfig.url = "github:sivizius/nixfiles/development?dir=libs/config";
libcore.url = "github:sivizius/nixfiles/development?dir=libs/core";
nixpkgs.url = "github:NixOS/nixpkgs/master";
redshift-wayland.url = "github:sivizius/nixfiles/development?dir=packages/redshift-wayland";
wofi-unpatched.url = "github:sivizius/nixfiles/development?dir=packages/wofi-unpatched";
};
outputs
= { self, fork-awesome, libconfig, libcore, nix, nixpkgs, redshift-wayland, wofi-unpatched, ... }:
let
inherit(libconfig.lib { inherit self; }) packages host;
inherit(libcore.lib { inherit self; debug.logLevel = "info"; }) debug path set target;
config
= {
allowedNonSourcePackages
= [
"adoptopenjdk-hotspot-bin"
"ant"
"discord"
"electron"
"ghidra"
"gradle"
"i2p"
"libreoffice"
"libreoffice-7.3.7.2-wrapped"
"pdftk"
"sof-firmware"
"spotify"
"tor-browser-bundle-bin"
"vscodium"
"wine"
];
allowedUnfreePackages
= [
"discord"
"hopper"
"memtest86-efi"
"spotify"
];
};
custom
= target.System.mapStdenv
(
system:
{
fork-awesome = fork-awesome.packages."${system}";
redshift-wayland = redshift-wayland.packages."${system}";
wofi-unpatched = wofi-unpatched.packages."${system}";
}
);
registries
= { inherit custom; }
// (
set.mapValues
(packages.fromNixpkgs { inherit config nixpkgs; })
(path.import ./.)
);
in
{
registries
= (
target.System.mapStdenv
(
system:
set.mapValues
(
{ ... } @ registry:
registry."${system}"
)
registries
)
)
// {
__functor
= { ... } @ registries:
{ targetSystem, ... }:
registries."${targetSystem}";
};
};
}