feat(home): enhance user environment and dynamic theming
- Implement dynamic palette generation from colors.toml themes - Update script wrapper to handle non-executable source files - Integrate Stylix for unified application theming - Add state-based logic for persistent dynamic configurations
This commit is contained in:
@@ -7,7 +7,7 @@ let
|
||||
themeStateFile = "${config.home.homeDirectory}/.config/home-manager/theme-state.nix";
|
||||
activeThemeName = if builtins.pathExists themeStateFile then
|
||||
lib.removeSuffix "\n" (builtins.readFile themeStateFile)
|
||||
else "dracula";
|
||||
else "nord";
|
||||
|
||||
wallpaperStateFile = "${config.home.homeDirectory}/.config/home-manager/wallpaper-state.nix";
|
||||
activeWallpaper = if builtins.pathExists wallpaperStateFile then
|
||||
@@ -15,13 +15,14 @@ let
|
||||
else "${../../themes/catppuccin/backgrounds/1-totoro.png}"; # Fallback
|
||||
|
||||
# Map nix-colors palette to a format Stylix expects (attrset of hex strings)
|
||||
currentPalette = (palettes.${activeThemeName} or palettes.dracula).palette;
|
||||
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.stylix.homeModules.stylix ];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
enableReleaseChecks = false;
|
||||
image = activeWallpaper;
|
||||
base16Scheme = currentPalette;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user