Files
lux/modules/capabilities/theme.nix
T

91 lines
1.8 KiB
Nix

{
config,
...
}:
let
facts = config.facts;
hmModules = config.flake.modules.homeManager;
mkCursorTheme =
pkgs:
facts.theme.cursor
// {
package = pkgs.${facts.theme.cursor.packageName};
};
in
{
flake.modules.nixos.theme =
{
pkgs,
...
}:
let
cursorTheme = mkCursorTheme pkgs;
in
{
home-manager.sharedModules = [ hmModules.theme ];
environment.systemPackages = [ cursorTheme.package ];
services.displayManager.sddm.settings = {
Theme = {
CursorTheme = cursorTheme.name;
CursorSize = cursorTheme.size;
};
};
};
flake.modules.homeManager.theme =
{ config, pkgs, ... }:
let
theme = facts.theme;
cursorTheme = mkCursorTheme pkgs;
kanagawaThemeSrc = pkgs.fetchFromGitHub {
inherit (theme.kanagawa)
hash
owner
repo
rev
;
};
kanagawaOverride = {
version = theme.kanagawa.version;
src = kanagawaThemeSrc;
};
in
{
home.pointerCursor = {
enable = true;
inherit (cursorTheme)
name
package
size
;
dotIcons.enable = false;
gtk.enable = true;
};
gtk = {
enable = true;
gtk3.bookmarks = [
"sftp://orion Orion VPS"
];
theme = {
name = theme.kanagawa.gtkThemeName;
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
};
gtk4.theme = null;
iconTheme = {
name = theme.kanagawa.iconThemeName;
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
};
};
qt = {
enable = true;
platformTheme.name = "gtk3";
};
};
}