60 lines
1.3 KiB
Nix
60 lines
1.3 KiB
Nix
{ lib, config, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
# https://github.com/nix-community/home-manager/blob/master/modules/misc/gtk.nix
|
|
iconThemeType = types.submodule {
|
|
options = {
|
|
package = mkOption {
|
|
type = types.nullOr types.package;
|
|
default = null;
|
|
example = literalExpression "pkgs.gnome.adwaita-icon-theme";
|
|
description = ''
|
|
Package providing the icon theme. This package will be installed
|
|
to your profile. If `null` then the theme
|
|
is assumed to already be available in your profile.
|
|
'';
|
|
};
|
|
|
|
name = mkOption {
|
|
type = types.str;
|
|
example = "Adwaita";
|
|
description = "The name of the icon theme within the package.";
|
|
};
|
|
};
|
|
};
|
|
in
|
|
{
|
|
options = {
|
|
home = {
|
|
iconTheme = mkOption {
|
|
type = types.nullOr iconThemeType;
|
|
default = null;
|
|
description = ''
|
|
The icon theme to use.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config =
|
|
let
|
|
cfg = config.home.iconTheme;
|
|
in
|
|
{
|
|
gtk = mkIf config.gtk.enable (mkDefault {
|
|
iconTheme = {
|
|
name = cfg.name;
|
|
package = cfg.package;
|
|
};
|
|
});
|
|
|
|
services.dunst = mkIf config.services.dunst.enable (mkDefault {
|
|
iconTheme = {
|
|
name = cfg.name;
|
|
package = cfg.package;
|
|
};
|
|
});
|
|
};
|
|
}
|