From 9970a7c382d5ef532ef3a668684a6582ae4c2d90 Mon Sep 17 00:00:00 2001 From: Adrian G L Date: Mon, 1 Dec 2025 15:50:40 +0100 Subject: [PATCH] feat: add stylix to home manager config using nix-colors palette Co-authored-by: aider (openrouter/google/gemini-3-pro-preview) --- flake.nix | 10 +++++++-- home/colors.nix | 5 ++++- home/stylix.nix | 60 +++++++++++++++++++------------------------------ 3 files changed, 35 insertions(+), 40 deletions(-) diff --git a/flake.nix b/flake.nix index 68130ab..3010c98 100644 --- a/flake.nix +++ b/flake.nix @@ -65,7 +65,10 @@ home-manager.users.gunalx = import ./home/gunalx.nix; home-manager.backupFileExtension = "bac"; home-manager.extraSpecialArgs = { inherit nix-colors inputs; }; - home-manager.sharedModules = [ inputs.sops-nix.homeManagerModules.sops ]; + home-manager.sharedModules = [ + inputs.sops-nix.homeManagerModules.sops + inputs.stylix.homeManagerModules.stylix + ]; } ./modules/unstable.nix @@ -98,7 +101,10 @@ home-manager.users.gunalx = import ./home/gunalx.nix; home-manager.backupFileExtension = "bac"; home-manager.extraSpecialArgs = { inherit nix-colors inputs; }; - home-manager.sharedModules = [ inputs.sops-nix.homeManagerModules.sops ]; + home-manager.sharedModules = [ + inputs.sops-nix.homeManagerModules.sops + inputs.stylix.homeManagerModules.stylix + ]; } ./modules/unstable.nix diff --git a/home/colors.nix b/home/colors.nix index 75de011..523ceab 100644 --- a/home/colors.nix +++ b/home/colors.nix @@ -149,7 +149,10 @@ let ''; in { - imports = [ nix-colors.homeManagerModules.default ]; + imports = [ + nix-colors.homeManagerModules.default + ./stylix.nix + ]; colorScheme = { slug = "teal-green-dark"; diff --git a/home/stylix.nix b/home/stylix.nix index 6dbf1e0..af5b235 100644 --- a/home/stylix.nix +++ b/home/stylix.nix @@ -1,42 +1,28 @@ -# home.nix +{ pkgs, config, ... }: + { - pkgs, - config, - nix-colors, - ... -}: + stylix.enable = true; -let - nix-colors-lib = nix-colors.lib.contrib { inherit pkgs; }; - c = config.colorScheme.palette; # Access palette colors -in -{ - imports = [ nix-colors.homeManagerModules.default ]; + stylix.image = ./Wallpapers/1346679.jpg; - colorScheme = { - slug = "teal-green-dark"; - name = "Teal Green Dark"; - author = "Adrian"; - palette = { - # Base16 Teal‐Green Dark Theme - Enhanced Teal Version - base00 = "0c1f1d"; # Default background - deeper teal base - base01 = "12302d"; # Lighter background (status bars) - base02 = "1c3b38"; # Selection background - base03 = "26514d"; # Comments, secondary content - base04 = "447b76"; # Dark foreground (status bars) - base05 = "c4e5e0"; # Default foreground - base06 = "d4f0ed"; # Light foreground - base07 = "f0fbfa"; # Lightest background - base08 = "5fcac0"; # Variables, markup link text - teal accent - base09 = "40bfa5"; # Integers, constants - teal-green - base0A = "60d5b0"; # Classes, search highlight - bright teal - base0B = "40c0a0"; # Strings, inserted - true teal (less green) - base0C = "30d0c0"; # Support, escape characters - cyan-teal - base0D = "2aa198"; # Functions, headings - classic teal - base0E = "3cb4ac"; # Keywords, selectors - teal-blue - base0F = "70d0c0"; # Deprecated tags - light teal - - }; + stylix.base16Scheme = { + scheme = config.colorScheme.name; + author = config.colorScheme.author; + base00 = config.colorScheme.palette.base00; + base01 = config.colorScheme.palette.base01; + base02 = config.colorScheme.palette.base02; + base03 = config.colorScheme.palette.base03; + base04 = config.colorScheme.palette.base04; + base05 = config.colorScheme.palette.base05; + base06 = config.colorScheme.palette.base06; + base07 = config.colorScheme.palette.base07; + base08 = config.colorScheme.palette.base08; + base09 = config.colorScheme.palette.base09; + base0A = config.colorScheme.palette.base0A; + base0B = config.colorScheme.palette.base0B; + base0C = config.colorScheme.palette.base0C; + base0D = config.colorScheme.palette.base0D; + base0E = config.colorScheme.palette.base0E; + base0F = config.colorScheme.palette.base0F; }; - }