mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 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"
|
||||
, homeManagerBranch ? "home-manager"
|
||||
, extraModules ? [ ]
|
||||
, specialArgs ? { }
|
||||
}:
|
||||
let
|
||||
pkgs = inputs.${nixpkgsBranch}.legacyPackages.${system};
|
||||
in
|
||||
inputs.${homeManagerBranch}.lib.homeManagerConfiguration {
|
||||
extraSpecialArgs = {
|
||||
extraSpecialArgs = specialArgs // {
|
||||
foodogsquaredModulesPath = builtins.toString homeManagerModules;
|
||||
};
|
||||
|
||||
|
@ -13,7 +13,7 @@ let
|
||||
partsConfig = config;
|
||||
|
||||
# A thin wrapper around the NixOS configuration function.
|
||||
mkHost = { extraModules ? [ ], nixpkgsBranch ? "nixpkgs", system }:
|
||||
mkHost = { system ,extraModules ? [ ], nixpkgsBranch ? "nixpkgs", specialArgs ? { } }:
|
||||
let
|
||||
nixpkgs = inputs.${nixpkgsBranch};
|
||||
|
||||
@ -25,7 +25,7 @@ let
|
||||
nixosSystem = args: import "${nixpkgs}/nixos/lib/eval-config.nix" args;
|
||||
in
|
||||
(lib.makeOverridable nixosSystem) {
|
||||
specialArgs = {
|
||||
specialArgs = specialArgs // {
|
||||
foodogsquaredUtils = import ../../../lib/utils/nixos.nix { inherit lib; };
|
||||
foodogsquaredModulesPath = builtins.toString nixosModules;
|
||||
};
|
||||
|
@ -9,13 +9,19 @@ let
|
||||
cfg = config.setups.nixvim;
|
||||
nixvimModules = ../../nixvim;
|
||||
|
||||
mkNixvimConfig = { system, pkgs, nixvimBranch ? "nixvim", modules ? [ ] }:
|
||||
mkNixvimConfig = {
|
||||
system,
|
||||
pkgs,
|
||||
nixvimBranch ? "nixvim",
|
||||
modules ? [ ],
|
||||
specialArgs ? { },
|
||||
}:
|
||||
inputs.${nixvimBranch}.legacyPackages.${system}.makeNixvimWithModule {
|
||||
inherit pkgs;
|
||||
module = {
|
||||
imports = modules;
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
extraSpecialArgs = specialArgs // {
|
||||
foodogsquaredModulesPath = builtins.toString nixvimModules;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user