Refactor using flake-parts (#4)

Reviewed-on: https://git.earth2077.fr/leana/.files/pulls/4
Co-authored-by: Léana 江 <leana.jiang@icloud.com>
Co-committed-by: Léana 江 <leana.jiang@icloud.com>
This commit is contained in:
Léana 江 2024-05-02 17:03:36 +00:00 committed by Léana 江
parent 06f76e0a37
commit db5aaa5811
17 changed files with 343 additions and 294 deletions

View file

@ -0,0 +1,43 @@
{ inputs, ... }:
{
perSystem =
{ system, self', ... }:
{
_module.args = rec {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
# extend pkgs with other inputs
(_: prev: prev.lib.mapAttrs (name: input: input.packages.${system}.default) inputs)
(_: _: {
unstable = import inputs.nixunstable { inherit system; };
nur = import inputs.nixnur {
inherit pkgs;
nurpkgs = pkgs;
};
})
# extend pkgs with my custom set
(_: _: { myPkgs = self'.packages; })
# resolve pinned pkg sets as attributes
(_: _: {
neovim-pin = import inputs.neovim-pin { inherit system; };
ghc-pin = import inputs.ghc-pin { inherit system; };
alt-ergo-pin = import inputs.alt-ergo-pin {
inherit system;
config.allowUnfree = true;
};
})
];
config.allowUnfreePredicate =
pkg:
builtins.elem (inputs.nixpkgs.lib.getName pkg) [
"discord"
"languagetool"
];
};
};
};
}