refactor
This commit is contained in:
@@ -3,26 +3,23 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
repo = config.repo;
|
||||
repoHelpers = repo.helpers;
|
||||
facts = config.facts;
|
||||
hmModules = config.flake.modules.homeManager;
|
||||
mkCursorTheme =
|
||||
pkgs:
|
||||
facts.theme.cursor
|
||||
// {
|
||||
package = pkgs.${facts.theme.cursor.packageName};
|
||||
};
|
||||
in
|
||||
{
|
||||
repo.theme = import ./_theme.nix;
|
||||
|
||||
flake.modules.nixos.theme =
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
repoTheme = repo.theme;
|
||||
cursorTheme = repoTheme.cursor // {
|
||||
package = repoHelpers.resolvePackagePath {
|
||||
inherit pkgs;
|
||||
path = repoTheme.cursor.packagePath;
|
||||
};
|
||||
};
|
||||
cursorTheme = mkCursorTheme pkgs;
|
||||
in
|
||||
{
|
||||
home-manager.sharedModules = [ hmModules.theme ];
|
||||
@@ -40,16 +37,11 @@ in
|
||||
flake.modules.homeManager.theme =
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
repoTheme = repo.theme;
|
||||
cursorTheme = repoTheme.cursor // {
|
||||
package = repoHelpers.resolvePackagePath {
|
||||
inherit pkgs;
|
||||
path = repoTheme.cursor.packagePath;
|
||||
};
|
||||
};
|
||||
theme = facts.theme;
|
||||
cursorTheme = mkCursorTheme pkgs;
|
||||
|
||||
kanagawaThemeSrc = pkgs.fetchFromGitHub {
|
||||
inherit (repoTheme.kanagawa)
|
||||
inherit (theme.kanagawa)
|
||||
hash
|
||||
owner
|
||||
repo
|
||||
@@ -58,7 +50,7 @@ in
|
||||
};
|
||||
|
||||
kanagawaOverride = {
|
||||
version = repoTheme.kanagawa.version;
|
||||
version = theme.kanagawa.version;
|
||||
src = kanagawaThemeSrc;
|
||||
};
|
||||
in
|
||||
@@ -79,12 +71,12 @@ in
|
||||
"sftp://orion Orion VPS"
|
||||
];
|
||||
theme = {
|
||||
name = repoTheme.kanagawa.gtkThemeName;
|
||||
name = theme.kanagawa.gtkThemeName;
|
||||
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
|
||||
};
|
||||
gtk4.theme = null;
|
||||
iconTheme = {
|
||||
name = repoTheme.kanagawa.iconThemeName;
|
||||
name = theme.kanagawa.iconThemeName;
|
||||
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user