mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
flake-parts/setups: add specialArgs option for home-manager and NixVim configs
This commit is contained in:
parent
6cd3e355fa
commit
788880c1e6
@ -120,6 +120,7 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config = cfg.sharedNixpkgsConfig;
|
nixpkgs.config = cfg.sharedNixpkgsConfig;
|
||||||
|
specialArgs = cfg.sharedSpecialArgs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
@ -132,6 +133,13 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sharedSpecialArgs = options.setups.sharedSpecialArgs // {
|
||||||
|
description = ''
|
||||||
|
Shared set of module arguments as part of `_module.specialArgs` of the
|
||||||
|
configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
sharedModules = lib.mkOption {
|
sharedModules = lib.mkOption {
|
||||||
type = with lib.types; listOf deferredModule;
|
type = with lib.types; listOf deferredModule;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
@ -165,6 +173,7 @@ in
|
|||||||
(import ./shared/nix-conf.nix { inherit inputs; })
|
(import ./shared/nix-conf.nix { inherit inputs; })
|
||||||
(import ./shared/config-options.nix { inherit (config) systems; })
|
(import ./shared/config-options.nix { inherit (config) systems; })
|
||||||
./shared/nixpkgs-options.nix
|
./shared/nixpkgs-options.nix
|
||||||
|
./shared/special-args-options.nix
|
||||||
configType
|
configType
|
||||||
]);
|
]);
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -108,6 +108,8 @@ let
|
|||||||
modules = [
|
modules = [
|
||||||
"${partsConfig.setups.configDir}/nixvim/${config.configName}"
|
"${partsConfig.setups.configDir}/nixvim/${config.configName}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
specialArgs = cfg.sharedSpecialArgs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -169,6 +171,7 @@ in
|
|||||||
configs = lib.mkOption {
|
configs = lib.mkOption {
|
||||||
type = with lib.types; attrsOf (submodule [
|
type = with lib.types; attrsOf (submodule [
|
||||||
(import ./shared/config-options.nix { inherit (config) systems; })
|
(import ./shared/config-options.nix { inherit (config) systems; })
|
||||||
|
./shared/special-args-options.nix
|
||||||
configType
|
configType
|
||||||
]);
|
]);
|
||||||
default = { };
|
default = { };
|
||||||
@ -186,6 +189,14 @@ in
|
|||||||
environments when NixVim-specific integrations has been enabled.
|
environments when NixVim-specific integrations has been enabled.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sharedSpecialArgs = options.setups.sharedSpecialArgs // {
|
||||||
|
description = ''
|
||||||
|
Shared set of module arguments as part of `_module.specialArgs` of the
|
||||||
|
configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
standaloneConfigModules = modulesOption' "standalone configuration";
|
standaloneConfigModules = modulesOption' "standalone configuration";
|
||||||
|
|
||||||
sharedNixpkgsConfig = options.setups.sharedNixpkgsConfig // {
|
sharedNixpkgsConfig = options.setups.sharedNixpkgsConfig // {
|
||||||
|
Loading…
Reference in New Issue
Block a user