mkStandardFeatureFlakeModule -> mkStandardFeature

This commit is contained in:
greyweather committed 2026-09-02 04:23:40 +01:00
1 parent 0d6602004f
commit 1cfc810e69
1 file changed
+5 -5
+5 -5
View File
@@ -51,18 +51,18 @@
flake.homeModules.${moduleName} = func;
};
mkStandardFeatureFlakeModule = moduleName: { optionName, optionDefinition, systemConfig, homeConfig }: {
imports = [ (mkMirroredModulesFlakeModule "${moduleName}Options" ({ lib, ... }: {
mkStandardFeature = {
flakeModule = moduleName: optionName: optionDefinition: (mkMirroredModulesFlakeModule "${moduleName}Options" ({ lib, ... }: {
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) {
home-manager.users.${config.info.userName}.${optionName} = lib.mkDefault true;
} systemConfig);
};
flake.homeModules.${moduleName} = { lib, config, ... }: {
homeModule = { config, optionName }: homeConfig: {
config = lib.mkIf (attrByStrPath optionName config) homeConfig;
};
};