Change gtk theme and icons

This commit is contained in:
Malte Tammena 2021-05-30 20:47:58 +02:00
parent 5aaf91f8c9
commit 4036a01c12
7 changed files with 341 additions and 7 deletions

View file

@ -70,6 +70,22 @@
"type": "github"
}
},
"gruvbox-material-gtk": {
"flake": false,
"locked": {
"lastModified": 1618346479,
"narHash": "sha256-56Mu8zHcnB4++QXjAq3S7/UPvDB8DlpT14mAW3ketSY=",
"owner": "sainnhe",
"repo": "gruvbox-material-gtk",
"rev": "2418ff7988411c57f8974f14adeb70a64e7f25c1",
"type": "github"
},
"original": {
"owner": "sainnhe",
"repo": "gruvbox-material-gtk",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs_3"
@ -166,6 +182,7 @@
"root": {
"inputs": {
"emulator-2a": "emulator-2a",
"gruvbox-material-gtk": "gruvbox-material-gtk",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_4"

View file

@ -5,6 +5,10 @@
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware";
inputs.home-manager.url = "github:nix-community/home-manager";
inputs.emulator-2a.url = "github:MalteT/2a-emulator/develop";
inputs.gruvbox-material-gtk = {
url = "github:sainnhe/gruvbox-material-gtk";
flake = false;
};
outputs = { self, nixpkgs, nixos-hardware, home-manager, ... }@inputs:
let

View file

@ -5,12 +5,12 @@ rec {
gtk = {
enable = true;
theme = {
package = pkgs.gruvbox-dark-gtk;
name = "gruvbox-dark";
package = pkgs.callPackage ../pkgs/gruvbox-material-gtk.nix { };
name = "gruvbox-material";
};
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus";
package = pkgs.callPackage ../pkgs/gruvbox-material-icons.nix { };
name = "Gruvbox-Material-Dark";
};
gtk2 = {

View file

@ -31,7 +31,6 @@ in {
gimp
gnome3.nautilus
gnome3.sushi
hicolor-icon-theme
hledger
htop
inkscape

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchFromGitHub, hiDpi ? false }:
let
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
variant =
if hiDpi then "Gruvbox-Material-Dark-HIDPI" else "Gruvbox-Material-Dark";
in stdenv.mkDerivation rec {
pname = lock.nodes.gruvbox-material-gtk.locked.repo;
version = lock.nodes.gruvbox-material-gtk.locked.rev;
src = fetchFromGitHub {
owner = lock.nodes.gruvbox-material-gtk.locked.owner;
repo = lock.nodes.gruvbox-material-gtk.locked.repo;
rev = lock.nodes.gruvbox-material-gtk.locked.rev;
sha256 = lock.nodes.gruvbox-material-gtk.locked.narHash;
};
installPhase = ''
mkdir -p $out/share/themes/gruvbox-material
rm -rf README.md LICENSE demo.png icons
cp -r themes/${variant}/* $out/share/themes/gruvbox-material
'';
meta = with lib; {
description = "Gruvbox Material for GTK";
homepage = "https://github.com/sainnhe/gruvbox-material-gtk";
license = licenses.mit;
platforms = platforms.unix;
maintainers = [ ];
};
}

View file

@ -0,0 +1,46 @@
{ lib, stdenv, fetchFromGitHub, gtk3, pantheon, breeze-icons, gnome-icon-theme
, hicolor-icon-theme }:
let lock = builtins.fromJSON (builtins.readFile ../flake.lock);
in stdenv.mkDerivation rec {
pname = lock.nodes.gruvbox-material-gtk.locked.repo + "-icons";
version = lock.nodes.gruvbox-material-gtk.locked.rev;
src = fetchFromGitHub {
owner = lock.nodes.gruvbox-material-gtk.locked.owner;
repo = lock.nodes.gruvbox-material-gtk.locked.repo;
rev = lock.nodes.gruvbox-material-gtk.locked.rev;
sha256 = lock.nodes.gruvbox-material-gtk.locked.narHash;
};
nativeBuildInputs = [ gtk3 ];
propagatedBuildInputs = [
pantheon.elementary-icon-theme
breeze-icons
gnome-icon-theme
hicolor-icon-theme
];
dontDropIconThemeCache = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons
mv icons/* $out/share/icons
for theme in $out/share/icons/*; do
gtk-update-icon-cache $theme
done
runHook postInstall
'';
meta = with lib; {
description = "Gruvbox Material for GTK - Icons";
homepage = "https://github.com/sainnhe/gruvbox-material-gtk";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ ];
};
}