flake-parts/setups: properly initialize nixpkgs to be passed into module evaluation

This commit is contained in:
Gabriel Arazas 2024-07-12 13:05:32 +08:00
parent 8eb337cefc
commit c14a51aa9d
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 5 additions and 2 deletions

View File

@ -15,7 +15,8 @@ let
, specialArgs ? { }
}:
let
pkgs = inputs.${nixpkgsBranch}.legacyPackages.${system};
nixpkgs = inputs.${nixpkgsBranch};
pkgs = import nixpkgs { inherit system; };
in
inputs.${homeManagerBranch}.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs // {

View File

@ -18,13 +18,15 @@ let
nixpkgs = inputs.${nixpkgsBranch};
# Just to be sure, we'll use everything with the given nixpkgs' stdlib.
lib = nixpkgs.lib;
pkgs = import nixpkgs { inherit system; };
lib = pkgs.lib;
# Evaluating the system ourselves (which is trivial) instead of relying
# on nixpkgs.lib.nixosSystem flake output.
nixosSystem = args: import "${nixpkgs}/nixos/lib/eval-config.nix" args;
in
(lib.makeOverridable nixosSystem) {
inherit pkgs;
specialArgs = specialArgs // {
foodogsquaredUtils = import ../../../lib/utils/nixos.nix { inherit lib; };
foodogsquaredModulesPath = builtins.toString nixosModules;