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 cb61989
Show file tree
Hide file tree
Showing 15 changed files with 429 additions and 153 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
19 changes: 19 additions & 0 deletions modules/home/core/style/paradise.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
scheme: 'paradise'
author: 'manas140'
accent: 'B66467'
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: #${base01};
--dark1: #${base01};
--dark2: #${base01};
--dark3: #${base01};
--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
3 changes: 1 addition & 2 deletions modules/home/opt/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
anyrun.enable = lib.mkEnableOption "Enable anyrun";
cliphist.enable = lib.mkEnableOption "Enable cliphist";
firefox.enable = lib.mkEnableOption "Enable firefox";
foot.enable = lib.mkEnableOption "Enable foot";
gitui.enable = lib.mkEnableOption "Enable gitui";
gpg-agent.enable = lib.mkEnableOption "Enable gpg-agent";
hyprland.enable = lib.mkEnableOption "Enable hyprland";
Expand Down Expand Up @@ -38,7 +37,7 @@
default = "firefox";
};
terminal = lib.mkOption {
type = lib.types.enum ["kitty" "wezterm" "foot"];
type = lib.types.enum ["kitty" "wezterm"];
default = "kitty";
};
lock = lib.mkOption {
Expand Down
56 changes: 28 additions & 28 deletions modules/home/opt/shell/zellij/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lib,
...
}:
with config.colorscheme.palette;
with config.lib.stylix.colors;
lib.mkIf config.modules.zellij.enable {
programs.zellij = {
enable = true;
Expand Down Expand Up @@ -65,17 +65,17 @@ with config.colorscheme.palette;
themes {
default {
bg "#${mbg}"
fg "#${foreground}"
black "#${background}"
red "#${color9}"
green "#${color2}"
yellow "#${color3}"
blue "#${color4}"
magenta "#${color5}"
cyan "#${color6}"
white "#${color7}"
orange "#${color11}"
bg "#${base01}"
fg "#${base05}"
black "#${base00}"
red "#${base08}"
green "#${base0B}"
yellow "#${base09}"
blue "#${base0D}"
magenta "#${base0E}"
cyan "#${base0C}"
white "#${base05}"
orange "#${base0A}"
}
}
'';
Expand All @@ -87,7 +87,7 @@ with config.colorscheme.palette;
pane size=1 borderless=true {
plugin location="file:/home/gwen/.nix-profile/bin/zjstatus.wasm" {
format_left "{mode} #[fg=#${comment},bold]{session}"
format_left "{mode} #[fg=#${base00},bold]{session}"
format_center "{tabs}"
format_right "{swap_layout}{datetime}"
format_space ""
Expand All @@ -99,24 +99,24 @@ with config.colorscheme.palette;
command_git_branch_interval "10"
command_git_branch_rendermode "static"
mode_normal "#[bg=#${accent}] "
mode_pane "#[bg=#${color4}] {name} "
mode_tab "#[bg=#${color2}] {name} "
mode_scroll "#[bg=#${color1}] {name} "
mode_search "#[bg=#${color3}] {name} "
mode_locked "#[bg=#${color9}] {name} "
mode_normal "#[bg=#${base08}] "
mode_pane "#[bg=#${base0D}] {name} "
mode_tab "#[bg=#${base0C}] {name} "
mode_scroll "#[bg=#${base0B}] {name} "
mode_search "#[bg=#${base0E}] {name} "
mode_locked "#[bg=#${base08}] {name} "
tab_normal "#[fg=#${comment}] {index}:{name} "
tab_normal_fullscreen "#[fg=#${comment}] {index}:{name} {fullscreen_indicator}"
tab_normal_sync "#[fg=#${comment}] {index}:{name} <> "
tab_normal_floating "#[fg=#${comment}] {index}:{name} {floating_indicator}"
tab_normal "#[fg=#${base00}] {index}:{name} "
tab_normal_fullscreen "#[fg=#${base00}] {index}:{name} {fullscreen_indicator}"
tab_normal_sync "#[fg=#${base00}] {index}:{name} <> "
tab_normal_floating "#[fg=#${base00}] {index}:{name} {floating_indicator}"
tab_active "#[fg=#${accent},bold,dashed-underscore,bg=default,us=white] {name} "
tab_active_fullscreen "#[fg=#${accent},bold,italic] {name} {fullscreen_indicator}"
tab_active_sync "#[fg=#${accent},bold,italic] {name} {sync_indicator}"
tab_active_floating "#[fg=#${accent},bold,italic] {name} {floating_indicator}"
tab_active "#[fg=#${base08},bold,dashed-underscore,bg=default,us=white] {name} "
tab_active_fullscreen "#[fg=#${base08},bold,italic] {name} {fullscreen_indicator}"
tab_active_sync "#[fg=#${base08},bold,italic] {name} {sync_indicator}"
tab_active_floating "#[fg=#${base08},bold,italic] {name} {floating_indicator}"
datetime "#[fg=#${comment},bold] {format} "
datetime "#[fg=#${base00},bold] {format} "
datetime_format "%A, %d %b %Y %H:%M"
datetime_timezone "Europe/Paris"
Expand Down
1 change: 0 additions & 1 deletion modules/home/opt/term/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
imports = [
./foot
./kitty
./wezterm
];
Expand Down
48 changes: 0 additions & 48 deletions modules/home/opt/term/foot/default.nix

This file was deleted.

Loading

0 comments on commit cb61989

Please sign in to comment.