From b49e18f0db7b037d2879d883386840f57d3b1d03 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 18 May 2023 11:50:27 +0100 Subject: [PATCH] Initial add of custom delta-icon-theme --- desktop/pkgs/delta-icon-theme/default.nix | 44 +++++++++++++++++++ .../default.nix} | 5 ++- desktop/plasma.nix | 7 ++- desktop/sddm.nix | 2 +- 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 desktop/pkgs/delta-icon-theme/default.nix rename desktop/pkgs/{sddm-catppuccin-macchiato.nix => sddm-catppuccin-macchiato/default.nix} (85%) diff --git a/desktop/pkgs/delta-icon-theme/default.nix b/desktop/pkgs/delta-icon-theme/default.nix new file mode 100644 index 00000000..4f5c4639 --- /dev/null +++ b/desktop/pkgs/delta-icon-theme/default.nix @@ -0,0 +1,44 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + gtk3, +}: { + delta-icon-theme = stdenvNoCC.mkDerivation rec { + pname = "delta-icon-theme"; + version = "194df98e422c0a81912194808b76712bf5d78803"; + dontBuild = true; + + src = fetchFromGitHub { + owner = "Delta-Icons"; + repo = "linux"; + rev = version; + sha256 = "sha256-SSkI5Aj/TTHfDRYCWe7Ell6cWvPmBUeO/AC4xRrEUvU="; + }; + + nativeBuildInputs = [gtk3]; + + dontDropIconThemeCache = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/icons + mv Delta $out/share/icons + + for theme in $out/share/icons/*; do + gtk-update-icon-cache --force $theme + done + + runHook postInstall + ''; + + # meta = with lib; { + # description = "Delta icon theme"; + # homepage = "https://github.com/Delta-Icons/Linux"; + # license = licenses.gpl3Only; + # # darwin gives hash mismatch in source, probably because of file names differing only in case + # platforms = platforms.linux; + # maintainers = with maintainers; []; + # }; + }; +} diff --git a/desktop/pkgs/sddm-catppuccin-macchiato.nix b/desktop/pkgs/sddm-catppuccin-macchiato/default.nix similarity index 85% rename from desktop/pkgs/sddm-catppuccin-macchiato.nix rename to desktop/pkgs/sddm-catppuccin-macchiato/default.nix index b73c8371..f3dbd9e4 100644 --- a/desktop/pkgs/sddm-catppuccin-macchiato.nix +++ b/desktop/pkgs/sddm-catppuccin-macchiato/default.nix @@ -1,8 +1,9 @@ { - stdenv, + lib, + stdenvNoCC, fetchFromGitHub, }: { - sddm-catppuccin-macchiato = stdenv.mkDerivation rec { + sddm-catppuccin-macchiato = stdenvNoCC.mkDerivation rec { pname = "sddm-catppuccin-macchiato-theme"; version = "1.0"; dontBuild = true; diff --git a/desktop/plasma.nix b/desktop/plasma.nix index 305d64ab..80cdf9d1 100644 --- a/desktop/plasma.nix +++ b/desktop/plasma.nix @@ -1,4 +1,6 @@ -{pkgs, ...}: { +{pkgs, ...}: let + delta-icon-theme = pkgs.callPackage ./pkgs/delta-icon-theme {}; +in { imports = [./xserver.nix ./sddm.nix]; services.xserver.desktopManager.plasma5.enable = true; programs.kdeconnect.enable = true; @@ -6,6 +8,7 @@ libsForQt5.lightly libsForQt5.kwindowsystem catppuccin-kde - pkgs.papirus-icon-theme + papirus-icon-theme + delta-icon-theme ]; } diff --git a/desktop/sddm.nix b/desktop/sddm.nix index f9680afc..aac45090 100644 --- a/desktop/sddm.nix +++ b/desktop/sddm.nix @@ -1,5 +1,5 @@ {pkgs, ...}: let - sddm-catppuccin-macchiato = pkgs.callPackage ./pkgs/sddm-catppuccin-macchiato.nix {}; + sddm-catppuccin-macchiato = pkgs.callPackage ./pkgs/sddm-catppuccin-macchiato {}; in { environment.systemPackages = [ sddm-catppuccin-macchiato.sddm-catppuccin-macchiato