mkStandardFeatureFlakeModule -> mkStandardFeature
This commit is contained in:
1 file changed
+5
-5
@@ -51,18 +51,18 @@
|
|||||||
flake.homeModules.${moduleName} = func;
|
flake.homeModules.${moduleName} = func;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkStandardFeatureFlakeModule = moduleName: { optionName, optionDefinition, systemConfig, homeConfig }: {
|
mkStandardFeature = {
|
||||||
imports = [ (mkMirroredModulesFlakeModule "${moduleName}Options" ({ lib, ... }: {
|
flakeModule = moduleName: optionName: optionDefinition: (mkMirroredModulesFlakeModule "${moduleName}Options" ({ lib, ... }: {
|
||||||
options = setAttrByStrPath optionName optionDefinition;
|
options = setAttrByStrPath optionName optionDefinition;
|
||||||
})) ];
|
}));
|
||||||
|
|
||||||
flake.nixosModules.${moduleName} = { lib, config, ... }: {
|
nixosModule = { config, optionName }: systemConfig: {
|
||||||
config = lib.mkIf (attrByStrPath optionName config) (mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (attrByStrPath optionName config) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.${config.info.userName}.${optionName} = lib.mkDefault true;
|
home-manager.users.${config.info.userName}.${optionName} = lib.mkDefault true;
|
||||||
} systemConfig);
|
} systemConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.${moduleName} = { lib, config, ... }: {
|
homeModule = { config, optionName }: homeConfig: {
|
||||||
config = lib.mkIf (attrByStrPath optionName config) homeConfig;
|
config = lib.mkIf (attrByStrPath optionName config) homeConfig;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user