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

View file

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