options/style: add assertion for icon theme

This commit is contained in:
Anthony Rodriguez 2025-02-10 18:09:09 +01:00
parent ceac787218
commit a1ebf9d7fa
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA

View file

@ -94,7 +94,7 @@ in {
name = mkOption { name = mkOption {
type = str; type = str;
description = "The name for the icon theme that will be used for GTK programs"; description = "The name for the icon theme that will be used for GTK programs";
default = "Kora"; default = "kora";
}; };
package = mkOption { package = mkOption {
@ -116,8 +116,20 @@ in {
${toString themePath} set by the GTK module does not exist! ${toString themePath} set by the GTK module does not exist!
To suppress this message, make sure that To suppress this message, make sure that
`config.modules.theme.gtk.theme.package` contains `config.local.theme.gtk.theme.package` contains
the path `${cfg.theme.name}` the path `${cfg.gtk.theme.name}`
'';
})
(let
iconPath = cfg.gtk.iconTheme.package + /share/icons + "/${cfg.gtk.iconTheme.name}";
in {
assertion = cfg.gtk.enable -> pathExists iconPath;
message = ''
${toString iconPath} set by the GTK module does not exist!
To suppress this message, make sure that
`config.local.theme.gtk.iconTheme.package` contains
the path `${cfg.gtk.iconTheme.name}`
''; '';
}) })
{ {