2025-01-21 15:45:42 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2025-03-06 20:45:49 +00:00
|
|
|
}:
|
|
|
|
let
|
2025-01-21 15:45:42 +00:00
|
|
|
cfg = config.alqueva.system.dconf;
|
|
|
|
inherit (lib) types;
|
2025-03-06 20:45:49 +00:00
|
|
|
in
|
|
|
|
{
|
2025-01-21 15:45:42 +00:00
|
|
|
options.alqueva.system.dconf = {
|
|
|
|
enable = lib.mkEnableOption "configuration with DConf";
|
|
|
|
luminosity = lib.mkOption {
|
2025-03-06 20:45:49 +00:00
|
|
|
type = types.enum [
|
|
|
|
"dark"
|
|
|
|
"light"
|
|
|
|
"default"
|
|
|
|
];
|
2025-01-21 15:45:42 +00:00
|
|
|
default = "dark";
|
|
|
|
description = "The luminosity you want to use for GTK.";
|
2025-03-06 20:45:49 +00:00
|
|
|
apply = lum: if lum == "default" then lum else "prefer-${lum}";
|
2025-01-21 15:45:42 +00:00
|
|
|
};
|
|
|
|
theme = lib.mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "The theme you want to use for GTK.";
|
|
|
|
default = "";
|
|
|
|
};
|
|
|
|
icon.theme = lib.mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "The icon theme you want to use for GTK.";
|
|
|
|
default = "";
|
|
|
|
};
|
|
|
|
cursor = {
|
|
|
|
theme = lib.mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "The cursor theme you want to use for GTK.";
|
|
|
|
default = "";
|
|
|
|
};
|
|
|
|
size = lib.mkOption {
|
|
|
|
type = types.ints.u32;
|
|
|
|
default = 24;
|
|
|
|
description = "The cursor size you want to use for GTK.";
|
|
|
|
apply = size: lib.gvariant.mkUint32 size;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
extraDconfPackages = lib.mkOption {
|
|
|
|
type = types.listOf types.package;
|
|
|
|
description = "Extra packages to install for DConf.";
|
2025-03-06 20:45:49 +00:00
|
|
|
default = [ ];
|
2025-01-21 15:45:42 +00:00
|
|
|
};
|
|
|
|
extraDconfSettings = lib.mkOption {
|
|
|
|
type = types.attrsOf types.anything;
|
|
|
|
description = "Extra settings you want to apply to DConf.";
|
2025-03-06 20:45:49 +00:00
|
|
|
default = { };
|
2025-01-21 15:45:42 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
programs.dconf = {
|
|
|
|
profiles.user.databases = [
|
|
|
|
{
|
2025-03-06 20:45:49 +00:00
|
|
|
settings = {
|
|
|
|
"org/gnome/desktop/interface" = {
|
|
|
|
color-scheme = cfg.luminosity;
|
|
|
|
cursor-size = cfg.cursor.size;
|
|
|
|
cursor-theme = cfg.cursor.theme;
|
|
|
|
icon-theme = cfg.icon.theme;
|
|
|
|
gtk-theme = cfg.theme;
|
|
|
|
};
|
|
|
|
} // cfg.extraDconfSettings;
|
2025-01-21 15:45:42 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
packages = cfg.extraDconfPackages;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|