refactor to fix dependency on 'osConfig' arg

This commit is contained in:
greyweather committed 2026-08-28 05:26:46 +01:00
1 parent 1c1174edd3
commit 22d431e271
11 files changed
+86 -55

No files matched your search

+1 -13
View File
@@ -31,7 +31,7 @@
};
};
flake.homeModules.global = { pkgs, config, osConfig, lib, ... }: {
flake.homeModules.global = { pkgs, config, lib, ... }: {
options.helpers = {
mkSymlinkActivationScript = lib.mkOption {
type = lib.types.functionTo lib.types.str;
@@ -43,18 +43,6 @@
'';
readOnly = true;
};
inheritOsConfigToHome = lib.mkOption {
type = lib.types.functionTo lib.types.attrs;
default = let
safeOsConfig = builtins.tryEval osConfig;
in option: {
type = if safeOsConfig.success then safeOsConfig.value.helpers.attrByStrPath (safeOsConfig.value.helpers.typeOf (safeOsConfig.value.helpers.attrByStrPath option safeOsConfig.value)) lib.types else null;
default = (lib.mkIf (safeOsConfig.success) (safeOsConfig.value.helpers.attrByStrPath option safeOsConfig.value)).content;
readOnly = true;
};
readOnly = true;
};
};
};
}