mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-24 00:18:59 +00:00
flake-parts/setups: fix specialArgs inheritance from global setup module
This commit is contained in:
parent
f693f24903
commit
e1be6b4d04
@ -349,6 +349,8 @@ in {
|
|||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
setups.home-manager.sharedNixpkgsConfig = config.setups.sharedNixpkgsConfig;
|
setups.home-manager.sharedNixpkgsConfig = config.setups.sharedNixpkgsConfig;
|
||||||
|
|
||||||
|
setups.home-manager.sharedSpecialArgs = config.setups.sharedSpecialArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (cfg.configs != { }) {
|
(lib.mkIf (cfg.configs != { }) {
|
||||||
|
@ -269,6 +269,8 @@ in {
|
|||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
setups.nixos.sharedNixpkgsConfig = config.setups.sharedNixpkgsConfig;
|
setups.nixos.sharedNixpkgsConfig = config.setups.sharedNixpkgsConfig;
|
||||||
|
|
||||||
|
setups.nixos.sharedSpecialArgs = config.setups.sharedSpecialArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (cfg.configs != { }) {
|
(lib.mkIf (cfg.configs != { }) {
|
||||||
|
@ -225,6 +225,8 @@ in {
|
|||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
setups.nixvim.sharedNixpkgsConfig = config.setups.sharedNixpkgsConfig;
|
setups.nixvim.sharedNixpkgsConfig = config.setups.sharedNixpkgsConfig;
|
||||||
|
|
||||||
|
setups.nixvim.sharedSpecialArgs = config.setups.sharedSpecialArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (cfg.configs != { }) {
|
(lib.mkIf (cfg.configs != { }) {
|
||||||
|
@ -63,17 +63,9 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
wrapperManagerConfigModule = { name, config, lib, ... }: {
|
wrapperManagerConfigModule = { name, config, lib, ... }: {
|
||||||
options.wrapper-manager.src = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = ../../../subprojects/wrapper-manager-fds;
|
|
||||||
description = ''
|
|
||||||
The path containing wrapper-manager-fds source code to be used to
|
|
||||||
properly initialize and create the wrapper-manager environment.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.config = cfg.sharedNixpkgsConfig;
|
nixpkgs.config = cfg.sharedNixpkgsConfig;
|
||||||
|
specialArgs = cfg.sharedSpecialArgs;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
"${partsConfig.setups.configDir}/wrapper-manager/${config.configName}"
|
"${partsConfig.setups.configDir}/wrapper-manager/${config.configName}"
|
||||||
@ -94,6 +86,7 @@ in {
|
|||||||
attrsOf (submodule [
|
attrsOf (submodule [
|
||||||
(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
|
||||||
wrapperManagerConfigModule
|
wrapperManagerConfigModule
|
||||||
]);
|
]);
|
||||||
default = { };
|
default = { };
|
||||||
@ -111,6 +104,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 = [ ];
|
||||||
@ -160,6 +160,9 @@ in {
|
|||||||
{
|
{
|
||||||
setups.wrapper-manager.sharedNixpkgsConfig =
|
setups.wrapper-manager.sharedNixpkgsConfig =
|
||||||
config.setups.sharedNixpkgsConfig;
|
config.setups.sharedNixpkgsConfig;
|
||||||
|
|
||||||
|
setups.wrapper-manager.sharedSpecialArgs =
|
||||||
|
config.setups.sharedSpecialArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (cfg.configs != { }) {
|
(lib.mkIf (cfg.configs != { }) {
|
||||||
@ -177,11 +180,12 @@ in {
|
|||||||
};
|
};
|
||||||
in mkWrapperManagerPackage {
|
in mkWrapperManagerPackage {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
inherit (metadata) specialArgs;
|
||||||
inherit (metadata.wrapper-manager) src;
|
inherit (metadata.wrapper-manager) src;
|
||||||
modules = cfg.sharedModules ++ cfg.standaloneModules
|
modules = cfg.sharedModules ++ cfg.standaloneModules
|
||||||
++ metadata.modules;
|
++ metadata.modules;
|
||||||
}) validWrapperManagerConfigs;
|
}) validWrapperManagerConfigs;
|
||||||
};
|
};
|
||||||
});
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user