mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 18:19:09 +00:00
flake-parts/setups: properly initialize nixpkgs to be passed into module evaluation
This commit is contained in:
parent
8eb337cefc
commit
c14a51aa9d
@ -15,7 +15,8 @@ let
|
|||||||
, specialArgs ? { }
|
, specialArgs ? { }
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pkgs = inputs.${nixpkgsBranch}.legacyPackages.${system};
|
nixpkgs = inputs.${nixpkgsBranch};
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in
|
in
|
||||||
inputs.${homeManagerBranch}.lib.homeManagerConfiguration {
|
inputs.${homeManagerBranch}.lib.homeManagerConfiguration {
|
||||||
extraSpecialArgs = specialArgs // {
|
extraSpecialArgs = specialArgs // {
|
||||||
|
@ -18,13 +18,15 @@ let
|
|||||||
nixpkgs = inputs.${nixpkgsBranch};
|
nixpkgs = inputs.${nixpkgsBranch};
|
||||||
|
|
||||||
# Just to be sure, we'll use everything with the given nixpkgs' stdlib.
|
# 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
|
# Evaluating the system ourselves (which is trivial) instead of relying
|
||||||
# on nixpkgs.lib.nixosSystem flake output.
|
# on nixpkgs.lib.nixosSystem flake output.
|
||||||
nixosSystem = args: import "${nixpkgs}/nixos/lib/eval-config.nix" args;
|
nixosSystem = args: import "${nixpkgs}/nixos/lib/eval-config.nix" args;
|
||||||
in
|
in
|
||||||
(lib.makeOverridable nixosSystem) {
|
(lib.makeOverridable nixosSystem) {
|
||||||
|
inherit pkgs;
|
||||||
specialArgs = specialArgs // {
|
specialArgs = specialArgs // {
|
||||||
foodogsquaredUtils = import ../../../lib/utils/nixos.nix { inherit lib; };
|
foodogsquaredUtils = import ../../../lib/utils/nixos.nix { inherit lib; };
|
||||||
foodogsquaredModulesPath = builtins.toString nixosModules;
|
foodogsquaredModulesPath = builtins.toString nixosModules;
|
||||||
|
Loading…
Reference in New Issue
Block a user