refactor: simplify module composition

This commit is contained in:
2026-04-22 02:35:26 +02:00
parent 3b6c42ebe3
commit 5eec5689f4
25 changed files with 615 additions and 448 deletions
+28 -15
View File
@@ -1,3 +1,10 @@
{
config,
...
}:
let
metaLib = config.meta.lib;
in
{
flake.modules.nixos.theme =
{
@@ -5,10 +12,12 @@
...
}:
let
cursorTheme = {
name = "phinger-cursors-light";
package = pkgs.phinger-cursors;
size = 24;
repoTheme = metaLib.repo.theme;
cursorTheme = repoTheme.cursor // {
package = metaLib.resolvePackagePath {
inherit pkgs;
path = repoTheme.cursor.packagePath;
};
};
in
{
@@ -25,21 +34,25 @@
flake.modules.homeManager.theme =
{ config, pkgs, ... }:
let
cursorTheme = {
name = "phinger-cursors-light";
package = pkgs.phinger-cursors;
size = 24;
repoTheme = metaLib.repo.theme;
cursorTheme = repoTheme.cursor // {
package = metaLib.resolvePackagePath {
inherit pkgs;
path = repoTheme.cursor.packagePath;
};
};
kanagawaThemeSrc = pkgs.fetchFromGitHub {
owner = "Fausto-Korpsvart";
repo = "Kanagawa-GKT-Theme";
rev = "55ca4ba249eba21f861b9866b71ab41bb8930318";
hash = "sha256-UdMoMx2DoovcxSp/zBZ3PRv/Qpj+prd0uPm1gmdak2E=";
inherit (repoTheme.kanagawa)
hash
owner
repo
rev
;
};
kanagawaOverride = {
version = "unstable-2025-10-23";
version = repoTheme.kanagawa.version;
src = kanagawaThemeSrc;
};
in
@@ -59,14 +72,14 @@
"sftp://orion Orion VPS"
];
theme = {
name = "Kanagawa-BL-LB";
name = repoTheme.kanagawa.gtkThemeName;
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
};
gtk4.theme = {
inherit (config.gtk.theme) name package;
};
iconTheme = {
name = "Kanagawa";
name = repoTheme.kanagawa.iconThemeName;
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
};
};