yes
This commit is contained in:
parent
546eb76bd1
commit
1301fa3071
@ -1,11 +1,20 @@
|
||||
homeManagerModule:
|
||||
{ lib, config, options, ... }:
|
||||
|
||||
let
|
||||
copyModules = builtins.map
|
||||
homeManagerModule: {
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
copyModules =
|
||||
builtins.map
|
||||
(
|
||||
{ path, condition ? lib.const true }:
|
||||
{ config, osConfig, ... }:
|
||||
{
|
||||
path,
|
||||
condition ? lib.const true,
|
||||
}: {
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
lib.mkIf (condition config)
|
||||
(lib.setAttrByPath path (lib.mkDefault (lib.getAttrFromPath path osConfig)))
|
||||
)
|
||||
@ -37,9 +46,10 @@ let
|
||||
path = ["stylix" "override"];
|
||||
condition = homeConfig: config.stylix.base16Scheme == homeConfig.stylix.base16Scheme;
|
||||
}
|
||||
{ path = [ "stylix" "polarity" ]; }
|
||||
{path = ["stylix" "polarity" "force"];}
|
||||
{path = ["stylix" "polarity" "primaryScale" "dark"];}
|
||||
{path = ["stylix" "polarity" "primaryScale" "light"];}
|
||||
];
|
||||
|
||||
in {
|
||||
options.stylix.homeManagerIntegration = {
|
||||
followSystem = lib.mkOption {
|
||||
@ -73,7 +83,7 @@ in {
|
||||
lib.optionalAttrs (options ? home-manager)
|
||||
(lib.mkIf config.stylix.homeManagerIntegration.autoImport {
|
||||
home-manager.sharedModules =
|
||||
[ homeManagerModule ] ++
|
||||
(lib.optionals config.stylix.homeManagerIntegration.followSystem copyModules);
|
||||
[homeManagerModule]
|
||||
++ (lib.optionals config.stylix.homeManagerIntegration.followSystem copyModules);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user