mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
refactor: expose colorscheme set in flake
This commit is contained in:
@@ -168,5 +168,13 @@
|
||||
};
|
||||
|
||||
homeConfigurations = {};
|
||||
|
||||
# Collect colorschemes from all hosts and configs
|
||||
colorschemes = let
|
||||
homeConfigs = lib.mapAttrs' (n: v: lib.nameValuePair (lib.last (lib.splitString "@" n)) v.config) outputs.homeConfigurations;
|
||||
systemConfigs = lib.mapAttrs (_: v: v.config.home-manager.users.gabriel) outputs.systemConfigs;
|
||||
nixosConfigs = lib.mapAttrs (_: v: v.config.home-manager.users.gabriel) outputs.nixosConfigurations;
|
||||
in
|
||||
lib.mapAttrs (_: v: v.colorscheme.rawColorscheme) (homeConfigs // systemConfigs // nixosConfigs);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -56,12 +56,7 @@ in {
|
||||
hosts = mkOption {
|
||||
readOnly = true;
|
||||
type = types.attrs;
|
||||
default = let
|
||||
homeConfigs = lib.mapAttrs' (n: v: lib.nameValuePair (lib.last (lib.splitString "@" n)) v.config) outputs.homeConfigurations;
|
||||
systemConfigs = lib.mapAttrs (_: v: v.config.home-manager.users.gabriel) outputs.systemConfigs;
|
||||
nixosConfigs = lib.mapAttrs (_: v: v.config.home-manager.users.gabriel) outputs.nixosConfigurations;
|
||||
in
|
||||
lib.mapAttrs (_: v: v.colorscheme.rawColorscheme.colors.${cfg.mode}) (homeConfigs // systemConfigs // nixosConfigs);
|
||||
default = lib.mapAttrs (_: v: v.colors.${cfg.mode}) outputs.colorschemes;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user