refactor modules

This commit is contained in:
2026-03-29 17:10:57 +02:00
parent 0b0dd1a1ba
commit a13add9b81
31 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
kdeclarative,
libplasma,
plasma-workspace,
}:
stdenv.mkDerivation {
pname = "layan-kde-qt6";
version = "2025-02-13";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = "Layan-kde";
rev = "ace0b1d93e5f08c650630c146b2d637e1e2e6cd1";
hash = "sha256-T69bGjfZeOsJLmOZKps9N2wMv5VKYeo1ipGEsLAS+Sg=";
};
# Propagate sddm theme dependencies to user env otherwise sddm does
# not find them. Putting them in buildInputs is not enough.
propagatedUserEnvPkgs = [
kdeclarative
libplasma
plasma-workspace
];
postPatch = ''
patchShebangs install.sh
substituteInPlace install.sh \
--replace '$HOME/.local' $out \
--replace '$HOME/.config' $out/share
'';
installPhase = ''
runHook preInstall
name= ./install.sh --dest $out/share/themes
runHook postInstall
'';
passthru.updateScript = gitUpdater {};
meta = with lib; {
description = "Flat Design theme for KDE Plasma desktop";
homepage = "https://github.com/vinceliuice/Layan-kde";
license = licenses.gpl3Only;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,18 @@
{self, ...}: {
flake.homeModules.layan-qt6-overlay = {
nixpkgs.overlays = [
self.overlays.layan-qt6
];
};
flake.nixosModules.layan-qt6-overlay = {
nixpkgs.overlays = [
self.overlays.layan-qt6
];
};
flake.overlays.layan-qt6 = final: prev: {
layan-qt6 = final.kdePackages.callPackage ./_derivation.nix {};
};
perSystem = {pkgs, ...}: {
packages.layan-qt6 = pkgs.callPackage ./_derivation.nix {};
};
}

View File

@@ -0,0 +1,62 @@
{self, ...}: {
flake.nixosModules.layan = {pkgs, ...}: {
imports = [
self.nixosModules.unstable-overlay
self.nixosModules.layan-qt6-overlay
];
environment.systemPackages = [
pkgs.layan-qt6
pkgs.kdePackages.qtstyleplugin-kvantum
pkgs.unstable.layan-cursors
pkgs.layan-gtk-theme
pkgs.tela-circle-icon-theme
];
};
flake.homeModules.layan = {
lib,
pkgs,
...
}: {
imports = [
self.homeModules.layan-qt6-overlay
self.homeModules.unstable-overlay
];
home.packages = [
pkgs.layan-qt6
pkgs.kdePackages.qtstyleplugin-kvantum
pkgs.unstable.layan-cursors
pkgs.layan-gtk-theme
pkgs.tela-circle-icon-theme
];
qt.enable = false;
qt.style.name = "kvantum";
qt.style.package = pkgs.kdePackages.qtstyleplugin-kvantum;
qt.platformTheme.name = "gtk";
systemd.user.settings.Manager.DefaultEnvironment = lib.mapAttrs (_: lib.mkDefault) {
QT_STYLE_OVERRIDE = "kvantum";
QT_QPA_PLATFORMTHEME = "gtk";
};
xdg.configFile."Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
General.theme = "LayanDark";
};
# add nord like gtk theme
gtk = {
enable = true;
cursorTheme = {
package = pkgs.unstable.layan-cursors;
name = "Layan-cursors";
};
theme = {
package = pkgs.layan-gtk-theme;
name = "Layan-Dark";
};
iconTheme = {
package = pkgs.tela-circle-icon-theme;
name = "Tela-circle-dark";
};
};
};
}