flake: packages: convert to 'flake-parts'

This commit is contained in:
Bruno BELANYI 2023-03-08 18:04:17 +00:00
parent 2b969f7726
commit ec036255ad
2 changed files with 14 additions and 12 deletions

View file

@ -26,8 +26,6 @@ let
default = self.apps.${system}.diff-flake;
};
packages = import ./packages.nix inputs system;
# Work-around for https://github.com/nix-community/home-manager/issues/3075
legacyPackages = {
homeConfigurations = {
@ -75,6 +73,7 @@ flake-parts.lib.mkFlake { inherit inputs; } {
./lib.nix
./nixos.nix
./overlays.nix
./packages.nix
];
flake = (eachMySystem systemDependant);

View file

@ -1,10 +1,13 @@
{ self, futils, nixpkgs, ... }:
system:
let
inherit (futils.lib) filterPackages flattenTree;
pkgs = nixpkgs.legacyPackages.${system};
packages = import "${self}/pkgs" { inherit pkgs; };
flattenedPackages = flattenTree packages;
finalPackages = filterPackages system flattenedPackages;
in
finalPackages
{ self, inputs, ... }:
{
perSystem = { pkgs, system, ... }: {
packages =
let
inherit (inputs.futils.lib) filterPackages flattenTree;
packages = import "${self}/pkgs" { inherit pkgs; };
flattenedPackages = flattenTree packages;
finalPackages = filterPackages system flattenedPackages;
in
finalPackages;
};
}