mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
flake-parts/setups: add specialArgs to each builder function
It's only there in its raw function but we probably don't want to expose this especially that it will make integration for each to be a pain to implement. For now, it will just sit and exist and being reconsidered and reverted at some point if it isn't.
This commit is contained in:
parent
bae6230728
commit
6c2974e2c8
@ -12,12 +12,13 @@ let
|
|||||||
, nixpkgsBranch ? "nixpkgs"
|
, nixpkgsBranch ? "nixpkgs"
|
||||||
, homeManagerBranch ? "home-manager"
|
, homeManagerBranch ? "home-manager"
|
||||||
, extraModules ? [ ]
|
, extraModules ? [ ]
|
||||||
|
, specialArgs ? { }
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pkgs = inputs.${nixpkgsBranch}.legacyPackages.${system};
|
pkgs = inputs.${nixpkgsBranch}.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
inputs.${homeManagerBranch}.lib.homeManagerConfiguration {
|
inputs.${homeManagerBranch}.lib.homeManagerConfiguration {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = specialArgs // {
|
||||||
foodogsquaredModulesPath = builtins.toString homeManagerModules;
|
foodogsquaredModulesPath = builtins.toString homeManagerModules;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ let
|
|||||||
partsConfig = config;
|
partsConfig = config;
|
||||||
|
|
||||||
# A thin wrapper around the NixOS configuration function.
|
# A thin wrapper around the NixOS configuration function.
|
||||||
mkHost = { extraModules ? [ ], nixpkgsBranch ? "nixpkgs", system }:
|
mkHost = { system ,extraModules ? [ ], nixpkgsBranch ? "nixpkgs", specialArgs ? { } }:
|
||||||
let
|
let
|
||||||
nixpkgs = inputs.${nixpkgsBranch};
|
nixpkgs = inputs.${nixpkgsBranch};
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ let
|
|||||||
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) {
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
@ -9,13 +9,19 @@ let
|
|||||||
cfg = config.setups.nixvim;
|
cfg = config.setups.nixvim;
|
||||||
nixvimModules = ../../nixvim;
|
nixvimModules = ../../nixvim;
|
||||||
|
|
||||||
mkNixvimConfig = { system, pkgs, nixvimBranch ? "nixvim", modules ? [ ] }:
|
mkNixvimConfig = {
|
||||||
|
system,
|
||||||
|
pkgs,
|
||||||
|
nixvimBranch ? "nixvim",
|
||||||
|
modules ? [ ],
|
||||||
|
specialArgs ? { },
|
||||||
|
}:
|
||||||
inputs.${nixvimBranch}.legacyPackages.${system}.makeNixvimWithModule {
|
inputs.${nixvimBranch}.legacyPackages.${system}.makeNixvimWithModule {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = {
|
module = {
|
||||||
imports = modules;
|
imports = modules;
|
||||||
};
|
};
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = specialArgs // {
|
||||||
foodogsquaredModulesPath = builtins.toString nixvimModules;
|
foodogsquaredModulesPath = builtins.toString nixvimModules;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user