Skip to content

Commit

Permalink
✨ (stylix): wip - migrating for nix-colors to stylix
Browse files Browse the repository at this point in the history
  • Loading branch information
elythh committed Apr 20, 2024
1 parent 0121829 commit a3e4bfe
Show file tree
Hide file tree
Showing 11 changed files with 399 additions and 74 deletions.
292 changes: 278 additions & 14 deletions flake.lock

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# Nix colors, used for app theming
nix-colors.url = "github:misterio77/nix-colors";

# Stylix, nix-colors alertnative
stylix.url = "github:danth/stylix";

# Zellij plugin for statusbar
zjstatus.url = "github:dj95/zjstatus";

Expand Down Expand Up @@ -77,6 +80,7 @@
nixpkgs,
nixpkgs-stable,
hm,
stylix,
nixos-hardware,
...
} @ inputs: let
Expand Down Expand Up @@ -111,6 +115,7 @@
modules = [
# > Our main home-manager configuration file <
./home/gwen/thinkpad.nix
stylix.homeManagerModules.stylix
];
};
"gwen@hp" = inputs.hm.lib.homeManagerConfiguration {
Expand Down
2 changes: 1 addition & 1 deletion home/gwen/thinkpad.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
config,
...
}: {
theme = "everblush";
theme = "paradise";
colorScheme = {
palette = import ../shared/cols/${config.theme}.nix {};
name = "${config.theme}";
Expand Down
1 change: 1 addition & 0 deletions modules/home/core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
./options.nix
./overlays.nix
./programs.nix
./style/stylix.nix
./home.nix
inputs.nix-colors.homeManagerModules.default
];
Expand Down
11 changes: 4 additions & 7 deletions modules/home/core/gtk.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
{pkgs, ...}: {
gtk = {
enable = true;
gtk3.extraConfig.gtk-decoration-layout = "menu:";
iconTheme.name = "Reversal-dark";
theme.name = "phocus";
font = {
name = "ZedMono NF";
size = 11;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override {color = "nordic";};
};
};
}
1 change: 0 additions & 1 deletion modules/home/core/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
username = "gwen";
homeDirectory = "/home/gwen";
stateVersion = "23.11";
file.".icons/default".source = "${pkgs.phinger-cursors}/share/icons/phinger-cursors";
file.".local/share/fonts".source = ./fonts;
activation = {
installConfig = ''
Expand Down
18 changes: 18 additions & 0 deletions modules/home/core/style/paradise.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
scheme: 'paradise'
author: 'manas140'
base00: '151515'
base01: '1F1F1F'
base02: '2E2E2E'
base03: '424242'
base04: 'BBB6B6'
base05: 'E8E3E3'
base06: 'E8E3E3'
base07: 'E8E3E3'
base08: 'B66467'
base09: 'D9BC8C'
base0A: 'D9BC8C'
base0B: '8C977D'
base0C: '8AA6A2'
base0D: '8DA3B9'
base0E: 'A988B0'
base0F: 'BBB6B6'
41 changes: 41 additions & 0 deletions modules/home/core/style/stylix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
pkgs,
config,
...
}: {
stylix = {
base16Scheme = ./${config.theme}.yaml;
image = ../../../../home/shared/walls/${config.theme}.jpg;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/ashes.yaml";
polarity = "dark";
cursor = {
name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors;
size = 20;
};

targets = {
k9s.enable = false;
lazygit.enable = false;
hyprland.enable = false;
firefox.enable = false;
fzf.enable = false;
rofi.enable = false;
gtk.extraCss = with config.lib.stylix.colors; ''
@define-color accent_color #${base0D};
@define-color accent_bg_color #${base0D};
'';
};

fonts = {
monospace = {
name = "ZedMono NF";
package = pkgs.nerdfonts.override {fonts = ["ZedMono"];};
};
sansSerif = {
name = "IBM Plex Sans";
package = pkgs.ibm-plex;
};
};
};
}
38 changes: 19 additions & 19 deletions modules/home/opt/misc/obsidian.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{config, ...}:
with config.colorscheme.palette; {
with config.lib.stylix.colors; {
home.file."workspace/vault/.obsidian/themes/elyth.css".text = ''
:root
{
--dark0: #${background};
--dark1: #${mbg};
--dark2: #${color8};
--dark3: #${color0};
--darker: #${darker};
--light0: #${foreground};
--light1: #${foreground};
--light2: #${color7};
--light3: #${color15};
--red: #${color1};
--orange: #${color11};
--yellow: #${color3};
--green: #${color2};
--purple: #${color13};
--lavender: #${color12};
--teal: #${color14};
--dark0: #${base00};
--dark1: #${base00};
--dark2: #${base00};
--dark3: #${base00};
--darker: #${base00};
--light0: #${base05};
--light1: #${base05};
--light2: #${base05};
--light3: #${base05};
--red: #${base08};
--orange: #${base09};
--yellow: #${base0A};
--green: #${base0B};
--purple: #${base0E};
--lavender: #${base0E};
--teal: #${base0C};
}
.theme-dark
Expand Down
30 changes: 15 additions & 15 deletions modules/home/opt/misc/vencord.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{config, ...}:
with config.colorscheme.palette; {
with config.lib.stylix.colors; {
home.file.".config/Vencord/themes/chadcat7.css".text = ''
/**
* @name Elyth
Expand Down Expand Up @@ -32,40 +32,40 @@ with config.colorscheme.palette; {
--discord-icon: none; /* change to 'block' to show default discord icon */
/* color of links */
--accent-1: #${color4};
--accent-1: #${base05};
/* color of unread dividers and some indicators */
--accent-2: #${color4};
--accent-2: #${base05};
/* color of accented buttons */
--accent-3: #${color7};
--accent-3: #${base0D};
/* color of accented buttons when hovered */
--accent-4: #${color7};
--accent-4: #${base0D};
/* color of accented buttons when clicked */
--accent-5: #${color7};
--accent-5: #${base0D};
/* color of mentions and messages that mention you */
--mention: hsla(190, 80%, 52%, 0.1);
/* color of mentions and messages that mention you when hovered */
--mention-hover: hsla(190, 80%, 52%, 0.05);
/* color of bright text on colored buttons */
--text-1: #${foreground};
--text-1: #${base05};
/* color of headings and important text */
--text-2: #${color15};
--text-2: #${base05};
/* color of normal text */
--text-3: #${color7};
--text-3: #${base05};
/* color of icon buttons and channels */
--text-4: #${comment};
--text-4: #${base05};
/* color of muted channels/chats and timestamps */
--text-5: #${comment};
--text-5: #${base05};
/* color of dark buttons when clicked */
--bg-1: #${mbg};
--bg-1: #${base00};
/* color of dark buttons */
--bg-2: #${mbg};
--bg-2: #${base00};
/* color of spacing around panels and secondary elements */
--bg-3: #${background};
--bg-3: #${base00};
/* main background color */
--bg-4: #${darker};
--bg-4: #${base00};
/* color of channels and icon buttons when hovered */
--hover: hsla(230, 20%, 40%, 0.1);
Expand Down
34 changes: 17 additions & 17 deletions modules/home/opt/wayland/services/ags/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
with config.colorscheme.palette; {
imports = [inputs.ags.homeManagerModules.default];
config = lib.mkIf (config.default.bar == "ags") {
home.file.".config/ags/style/colors.scss".text = ''
$base00: #${background};
$base01: #${mbg};
$base02: #${darker};
$base03: #${color4};
$base04: #${color5};
$base05: #${foreground};
$base06: #${color7};
$base07: #${color8};
$base08: #${color9};
$base09: #${color10};
$base0A: #${accent};
$base0B: #${color12};
$base0C: #${color13};
$base0D: #${color14};
$base0E: #${color15};
$base0F: #${accent};
home.file.".config/ags/style/colors.scss".text = with config.lib.stylix.colors; ''
$base00: #${base00};
$base01: #${base01};
$base02: #${base02};
$base03: #${base03};
$base04: #${base04};
$base05: #${base05};
$base06: #${base06};
$base07: #${base07};
$base08: #${base08};
$base09: #${base09};
$base0A: #${base0A};
$base0B: #${base0B};
$base0C: #${base0C};
$base0D: #${base0D};
$base0E: #${base0E};
$base0F: #${base0F};
'';

programs.ags = {
Expand Down

0 comments on commit a3e4bfe

Please sign in to comment.