1
Fork 0

feat: dynamic theming attempt

This commit is contained in:
Matei Adriel 2022-03-10 21:59:18 +02:00
parent 18c51ecc13
commit 2757c649b9
18 changed files with 120 additions and 30 deletions

View file

@ -0,0 +1 @@
{ ... }: { imports = [ ./fonts.nix ]; }

20
modules/themes/fonts.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
let
nerdfonts =
(pkgs.nerdfonts.override {
fonts = [ "FiraCode" "SourceCodePro" ];
});
in
{
home-manager.users.adrielus = {
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
fira-code
fira-code-symbols
source-code-pro
corefonts
nerdfonts
];
};
}

View file

@ -0,0 +1,29 @@
variant: { pkgs, ... }: {
name = "github-${variant}";
neovim = {
plugins = [
pkgs.myVimPlugins.github-nvim-theme # github theme for neovim
];
theme = ''
require('github-theme').setup({theme_style = "light", dark_float = true, transparent = true})
'';
lualineTheme = "github";
};
tmux.path = "${pkgs.githubNvimTheme}/terminal/tmux/github_light.conf";
alacritty.settings = {
import = [ "${pkgs.githubNvimTheme}/terminal/alacritty/github_light.yml" ];
window = {
padding = {
x = 8;
y = 8;
};
# transparent bg:)
background_opacity = 0.8;
gtk_theme_variant = "light";
};
};
}

2
modules/themes/theme.nix Normal file
View file

@ -0,0 +1,2 @@

View file

@ -0,0 +1,9 @@
{ pkgs }:
let githubVariant = import ./githubVariant.nix;
in
lib.map (theme: pkgs.callPackage theme { }) [
githubVariant
"light"
githubVariant
"dark"
]