feat(nvim-hm): set gtk theme via nix home manager
This commit is contained in:
parent
cd225b69bb
commit
cc00e11a8d
@ -12,10 +12,10 @@ let
|
||||
})
|
||||
# HACK: We don't use the absolute path in readDir to respect pure evaluation in nix flakes.
|
||||
(builtins.attrNames (builtins.readDir ../dots/${dir}))));
|
||||
gtkStyle = "gtk2";
|
||||
in
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
gcc
|
||||
@ -56,7 +56,16 @@ in
|
||||
ripgrep
|
||||
fd
|
||||
nixfmt
|
||||
qt6Packages.qt6gtk2
|
||||
qt6Packages.qt6ct
|
||||
libsForQt5.qtstyleplugins
|
||||
libsForQt5.qt5ct
|
||||
lxappearance
|
||||
webcord
|
||||
blueman
|
||||
gtk-engine-murrine
|
||||
];
|
||||
|
||||
file =
|
||||
{
|
||||
".local/" = {
|
||||
@ -77,12 +86,65 @@ in
|
||||
force = true;
|
||||
};
|
||||
} // softLinkDots ".config";
|
||||
|
||||
sessionVariables = {
|
||||
GTK_THEME = "Kanagawa-Borderless";
|
||||
QT_QPA_PLATFORMTHEME = "${gtkStyle}";
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ sqlite gh ];
|
||||
# Magick is required for image.nvim
|
||||
extraLuaPackages = lp: [ lp.magick ];
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
'';
|
||||
profileExtra = ''
|
||||
export GTK_PATH="$HOME/.nix-profile/lib/gtk-2.0"
|
||||
'';
|
||||
};
|
||||
neovim = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ sqlite gh ];
|
||||
# Magick is required for image.nvim
|
||||
extraLuaPackages = lp: [ lp.magick ];
|
||||
};
|
||||
};
|
||||
|
||||
gtk =
|
||||
let
|
||||
extraGtkConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
gtk-cursor-theme-size = 0;
|
||||
gtk-enable-event-sounds = 1;
|
||||
gtk-enable-input-feedback-sounds = 1;
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintfull";
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Kanagawa-Borderless";
|
||||
package = pkgs.kanagawa-gtk-theme;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Kanagawa";
|
||||
package = pkgs.kanagawa-gtk-theme;
|
||||
};
|
||||
font = {
|
||||
name = "Open Sans";
|
||||
size = 11;
|
||||
package = pkgs.open-sans;
|
||||
};
|
||||
gtk3.extraConfig = extraGtkConfig;
|
||||
gtk4.extraConfig = extraGtkConfig;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
[Settings]
|
||||
gtk-icon-theme-name=Kanagawa
|
||||
gtk-theme-name=Kanagawa-Borderless
|
||||
gtk-font-name=Open Sans 11
|
||||
gtk-application-prefer-dark-theme=0
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintfull
|
@ -1,16 +0,0 @@
|
||||
[Settings]
|
||||
gtk-icon-theme-name=Kanagawa
|
||||
gtk-theme-name=Kanagawa-Borderless
|
||||
gtk-font-name=Open Sans 11
|
||||
gtk-application-prefer-dark-theme=0
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintfull
|
@ -24,6 +24,7 @@
|
||||
({
|
||||
nixpkgs.overlays = [
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
(self: super: { kanagawa-gtk-theme = super.callPackage ./pkgs/kanagawa-gtk { }; })
|
||||
];
|
||||
home = {
|
||||
username = "${username}";
|
||||
|
29
pkgs/kanagawa-gtk/default.nix
Normal file
29
pkgs/kanagawa-gtk/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ lib, stdenvNoCC, fetchFromGitHub, gnome-themes-extra, gtk-engine-murrine }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "kanagawa-gtk-theme";
|
||||
version = "unstable-2023-11-30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Fausto-Korpsvart";
|
||||
repo = "Kanagawa-GKT-Theme";
|
||||
rev = "35936a1e3bbd329339991b29725fc1f67f192c1e";
|
||||
hash = "sha256-BZRmjVas8q6zsYbXFk4bCk5Ec/3liy9PQ8fqFGHAXe0=";
|
||||
};
|
||||
|
||||
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
|
||||
|
||||
buildInputs = [ gnome-themes-extra ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/themes/{Kanagawa-Border,Kanagawa-Borderless}
|
||||
mkdir -p $out/share/icons
|
||||
cp -r icons/Kanagawa $out/share/icons
|
||||
cp -r themes/Kanagawa-B/* $out/share/themes/Kanagawa-Border
|
||||
cp -r themes/Kanagawa-BL/* $out/share/themes/Kanagawa-Borderless
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user