ark/users/modules/settings/default.nix
2022-10-22 01:49:09 +03:00

51 lines
1.0 KiB
Nix

{
config,
lib,
...
}: let
l = lib // builtins;
t = l.types;
cfg = config.settings;
fontSettings = {
name = l.mkOption {
type = t.str;
};
package = l.mkOption {
type = t.package;
};
size = l.mkOption {
type = t.ints.unsigned;
};
fullName = l.mkOption {
type = t.str;
readOnly = true;
};
};
in {
options = {
settings.iconTheme = {
name = l.mkOption {
type = t.str;
};
package = l.mkOption {
type = t.package;
};
};
settings.terminal = {
name = l.mkOption {
type = t.str;
};
};
settings.font = {
regular = fontSettings;
monospace = fontSettings;
};
};
config = {
home.packages = [cfg.font.regular.package cfg.font.monospace.package];
settings.font.regular.fullName = "${cfg.font.regular.name} ${toString cfg.font.regular.size}";
settings.font.monospace.fullName = "${cfg.font.monospace.name} ${toString cfg.font.monospace.size}";
};
}