feat: switch to stylix for theming

This commit is contained in:
Youwen Wu 2024-10-30 21:38:05 -07:00
parent 404e6c6366
commit e11db09e24
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
11 changed files with 396 additions and 82 deletions

View file

@ -38,6 +38,72 @@
"type": "github" "type": "github"
} }
}, },
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1708890466,
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "665b3c6748534eb766c777298721cece9453fdae",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1725860795,
"narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "7f795bf75d38e0eea9fed287264067ca187b88a9",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1716150083,
"narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"type": "github"
}
},
"blink-cmp": { "blink-cmp": {
"inputs": { "inputs": {
"fenix": "fenix", "fenix": "fenix",
@ -184,6 +250,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -297,7 +379,28 @@
}, },
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": [
"stylix",
"systems"
]
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -328,6 +431,22 @@
"type": "github" "type": "github"
} }
}, },
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1689549921,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -350,6 +469,23 @@
"type": "github" "type": "github"
} }
}, },
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1713702291,
"narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "46.1",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -370,6 +506,27 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1724435763,
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"homebrew-cask": { "homebrew-cask": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -432,15 +589,15 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1720626042, "lastModified": 1729298361,
"narHash": "sha256-f8k+BezKdJfmE+k7zgBJiohtS3VkkriycdXYsKOm3sc=", "narHash": "sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U=",
"rev": "2a4376be20d70feaa2b0e640c5041fb66ddc67ed", "rev": "ad9d06f7838a25beec425ff406fe68721fef73be",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2a4376be20d70feaa2b0e640c5041fb66ddc67ed.tar.gz" "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/2.90.0.tar.gz" "url": "https://git.lix.systems/lix-project/lix/archive/2.91.1.tar.gz"
} }
}, },
"lix-module": { "lix-module": {
@ -453,15 +610,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720641669, "lastModified": 1729360442,
"narHash": "sha256-yEO2cGNgzm9x/XxiDQI+WckSWnZX63R8aJLBRSXtYNE=", "narHash": "sha256-6U0CyPycIBc04hbYy2hBINnVso58n/ZyywY2BD3hu+s=",
"rev": "5c48c833c15bb80d127a398a8c2484d42fdd8257", "rev": "9098ac95768f7006d7e070b88bae76939f6034e6",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/5c48c833c15bb80d127a398a8c2484d42fdd8257.tar.gz" "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/9098ac95768f7006d7e070b88bae76939f6034e6.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz" "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz"
} }
}, },
"nix-darwin": { "nix-darwin": {
@ -609,6 +766,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"plugins-lsp-progress": { "plugins-lsp-progress": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -683,6 +856,7 @@
"nix-homebrew": "nix-homebrew", "nix-homebrew": "nix-homebrew",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"spicetify": "spicetify", "spicetify": "spicetify",
"stylix": "stylix",
"vesktop-bin": "vesktop-bin", "vesktop-bin": "vesktop-bin",
"viminal": "viminal", "viminal": "viminal",
"wallpapers": "wallpapers", "wallpapers": "wallpapers",
@ -768,6 +942,36 @@
"type": "github" "type": "github"
} }
}, },
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_4",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_3",
"systems": "systems_4",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1729963473,
"narHash": "sha256-uGjTjvvlGQfQ0yypVP+at0NizI2nrb6kz4wGAqzRGbY=",
"owner": "danth",
"repo": "stylix",
"rev": "04afcfc0684d9bbb24bb1dc77afda7c1843ec93b",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -828,9 +1032,73 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1696725948,
"narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1716423189,
"narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "eb39e141db14baef052893285df9f266df041ff8",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "eb39e141db14baef052893285df9f266df041ff8",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1696725902,
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"vesktop-bin": { "vesktop-bin": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]

View file

@ -73,6 +73,8 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
stylix.url = "github:danth/stylix";
wallpapers = { wallpapers = {
url = "git+https://code.youwen.dev/youwen5/wallpapers"; url = "git+https://code.youwen.dev/youwen5/wallpapers";
flake = false; flake = false;

View file

@ -1,45 +1,45 @@
{ {
inputs, inputs,
system,
... ...
}: }:
{ {
imports = with inputs; [ imports =
./configuration.nix [
../../modules/linux/gaming ./configuration.nix
../../modules/linux/audio ../../modules/linux/gaming
../../modules/linux/networking ../../modules/linux/audio
../../modules/linux/fonts ../../modules/linux/networking
../../modules/linux/greeter ../../modules/linux/fonts
../../modules/linux/core ../../modules/linux/greeter
../../modules/linux/desktop-portal ../../modules/linux/core
../../modules/linux/desktop-portal ../../modules/linux/desktop-portal
../../modules/linux/audio-prod ../../modules/linux/desktop-portal
../../modules/linux/wine ../../modules/linux/audio-prod
../../overlays ../../modules/linux/wine
../../modules/linux/stylix
catppuccin.nixosModules.catppuccin ../../overlays
lix-module.nixosModules.default {
home-manager.nixosModules.home-manager home-manager.useGlobalPkgs = true;
{ home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true; home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true; home-manager.extraSpecialArgs = {
home-manager.backupFileExtension = "backup"; inherit inputs;
home-manager.extraSpecialArgs = { };
inherit inputs; home-manager.users.youwen = {
}; imports = [
home-manager.users.youwen = { ./home-manager-extras
imports = [ ../../users/youwen/linux/laptop
./home-manager-extras ../../users/youwen/linux/packages/x86_64
../../users/youwen/linux/laptop ../../users/youwen/linux/programs
../../users/youwen/linux/packages/x86_64 ../../users/youwen/common
../../users/youwen/linux/programs ../../users/youwen/linux/spicetify
../../users/youwen/common ../../users/youwen/common/fastfetch
../../users/youwen/linux/spicetify ];
../../users/youwen/common/fastfetch };
catppuccin.homeManagerModules.catppuccin }
]; ]
}; ++ (with inputs; [
} lix-module.nixosModules.default
]; home-manager.nixosModules.home-manager
]);
} }

View file

@ -2,17 +2,17 @@
{ {
fonts = { fonts = {
enableDefaultPackages = true; enableDefaultPackages = true;
fontconfig = { # fontconfig = {
defaultFonts = { # defaultFonts = {
serif = [ "Noto Serif" ]; # serif = [ "Noto Serif" ];
sansSerif = [ "Noto Sans" ]; # sansSerif = [ "Noto Sans" ];
}; # };
}; # };
packages = with pkgs; [ packages = with pkgs; [
noto-fonts # noto-fonts
noto-fonts-cjk-sans # noto-fonts-cjk-sans
noto-fonts-emoji # noto-fonts-emoji
(nerdfonts.override { fonts = [ "CascadiaCode" ]; }) # (nerdfonts.override { fonts = [ "CascadiaCode" ]; })
(google-fonts.override { fonts = [ "Lora" ]; }) (google-fonts.override { fonts = [ "Lora" ]; })
]; ];
}; };

View file

@ -0,0 +1,32 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.stylix.nixosModules.stylix
];
stylix = {
enable = true;
image = "${inputs.wallpapers}/aesthetic/afterglow_city_skyline_at_night.png";
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine.yaml";
polarity = "dark";
fonts = {
serif = {
name = "Noto Serif";
package = pkgs.noto-fonts;
};
sansSerif = {
name = "Noto Sans";
package = pkgs.noto-fonts;
};
emoji = {
name = "Noto Color Emoji";
package = pkgs.noto-fonts-emoji;
};
monospace = {
name = "CaskaydiaCove Nerd Font";
package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
};
};
};
}

View file

@ -161,7 +161,7 @@ in
programs.btop = { programs.btop = {
enable = true; enable = true;
settings = { settings = {
color_theme = "tokyo-night"; # color_theme = "tokyo-night";
vim_keys = true; vim_keys = true;
theme_background = false; theme_background = false;
}; };

View file

@ -54,7 +54,7 @@
# Notification daemon # Notification daemon
services.dunst = { services.dunst = {
enable = true; enable = true;
catppuccin.enable = true; # catppuccin.enable = true;
iconTheme = { iconTheme = {
name = "Papirus-Dark"; name = "Papirus-Dark";
package = pkgs.papirus-icon-theme; package = pkgs.papirus-icon-theme;
@ -67,7 +67,7 @@
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
theme = "gruvbox-dark"; # theme = "gruvbox-dark";
}; };
# Let home Manager install and manage itself. # Let home Manager install and manage itself.

View file

@ -1,7 +1,8 @@
{ pkgs, ... }:
{ {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
themeFile = "rose-pine"; # themeFile = "rose-pine";
font.name = "CaskaydiaCove Nerd Font"; font.name = "CaskaydiaCove Nerd Font";
shellIntegration.enableFishIntegration = true; shellIntegration.enableFishIntegration = true;
shellIntegration.enableBashIntegration = true; shellIntegration.enableBashIntegration = true;
@ -10,7 +11,7 @@
window_padding_width = "8 8 0"; window_padding_width = "8 8 0";
confirm_os_window_close = -1; confirm_os_window_close = -1;
enable_audio_bell = "no"; enable_audio_bell = "no";
background_opacity = "0.8"; background_opacity = pkgs.lib.mkForce "0.8";
allow_remote_control = "socket-only"; allow_remote_control = "socket-only";
listen_on = "unix:/tmp/kitty"; listen_on = "unix:/tmp/kitty";
scrollback_pager = ''nvim --noplugin -c "set signcolumn=no showtabline=0" -c "silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - "''; scrollback_pager = ''nvim --noplugin -c "set signcolumn=no showtabline=0" -c "silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - "'';

View file

@ -13,8 +13,8 @@ in
programs.spicetify = { programs.spicetify = {
enable = true; enable = true;
theme = spicepkgs.themes.dribbblish; # theme = spicepkgs.themes.dribbblish;
colorScheme = "rosepine"; # colorScheme = "rosepine";
enabledExtensions = with spicepkgs.extensions; [ enabledExtensions = with spicepkgs.extensions; [
lastfm lastfm
fullAppDisplayMod fullAppDisplayMod

View file

@ -1,6 +1,8 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./catppuccin.nix ]; # imports = [ ./catppuccin.nix ];
#
imports = [ ./stylix.nix ];
gtk = { gtk = {
enable = true; enable = true;
@ -11,20 +13,20 @@
iconTheme = { iconTheme = {
name = "Papirus-Dark"; name = "Papirus-Dark";
}; };
theme = { # theme = {
name = "rose-pine"; # name = "rose-pine";
package = pkgs.rose-pine-gtk-theme; # package = pkgs.rose-pine-gtk-theme;
}; # };
}; };
qt = { # qt = {
enable = true; # enable = true;
platformTheme.name = "gtk"; # platformTheme.name = "gtk";
style.name = "gtk2"; # style.name = "gtk2";
}; # };
home.file.".config/kdeglobals".text = '' # home.file.".config/kdeglobals".text = ''
[Colors:View] # [Colors:View]
BackgroundNormal=#191724 # BackgroundNormal=#191724
''; # '';
} }

View file

@ -0,0 +1,9 @@
{
stylix.targets = {
waybar.enable = false;
hyprland.enable = false;
kitty.variant256Colors = true;
neovim.enable = false;
kde.enable = true;
};
}