stylix: simplify API by renaming stylix.iconTheme option to stylix.icons

This commit is contained in:
NAHO 2025-07-20 23:09:00 +02:00
parent 699262a0f8
commit 1021b7d732
No known key found for this signature in database
GPG key ID: 229CB671D09B95F5
5 changed files with 26 additions and 12 deletions

View file

@ -33,10 +33,10 @@ mkTarget {
}
)
(
{ polarity, iconTheme }:
{ polarity, icons }:
{
programs.fuzzel.settings.main."icon-theme" =
if (polarity == "dark") then iconTheme.dark else iconTheme.light;
programs.fuzzel.settings.main."icons" =
if (polarity == "dark") then icons.dark else icons.light;
}
)
];

View file

@ -33,11 +33,11 @@
config = lib.mkIf (config.stylix.enable && config.stylix.targets.qt.enable) (
let
iconTheme =
icons =
if (config.stylix.polarity == "dark") then
config.stylix.iconTheme.dark
config.stylix.icons.dark
else
config.stylix.iconTheme.light;
config.stylix.icons.light;
recommendedStyles = {
gnome = if config.stylix.polarity == "dark" then "adwaita-dark" else "adwaita";
@ -91,8 +91,8 @@
+ lib.optionalString (config.qt.style ? name) ''
style=${config.qt.style.name}
''
+ lib.optionalString (iconTheme != null) ''
icon_theme=${iconTheme}
+ lib.optionalString (icons != null) ''
icon_theme=${icons}
'';
in

View file

@ -9,11 +9,11 @@ in
{
imports = [
./cursor.nix
./icon-theme.nix
./icons.nix
./palette.nix
../cursor.nix
../fonts.nix
../icon-theme.nix
../icons.nix
../opacity.nix
../palette.nix
../pixel.nix

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
let
cfg = config.stylix.iconTheme;
cfg = config.stylix.icons;
inherit (config.stylix) polarity;
in
{

View file

@ -1,6 +1,20 @@
{ lib, ... }:
{
options.stylix.iconTheme = {
imports = [
(lib.mkRenamedOptionModuleWith {
from = [
"stylix"
"iconTheme"
];
sinceRelease = 2511;
to = [
"stylix"
"icons"
];
})
];
options.stylix.icons = {
enable = lib.mkOption {
description = "enable/disable icon theming.";
type = lib.types.bool;