ark/users/modules/settings/default.nix

54 lines
1.1 KiB
Nix
Raw Normal View History

2022-07-01 04:45:26 +03:00
{
config,
2022-09-12 03:32:23 +03:00
lib,
2022-07-01 04:45:26 +03:00
...
}: let
2022-10-04 02:08:44 +03:00
l = lib // builtins;
t = l.types;
2022-09-12 03:32:23 +03:00
cfg = config.settings;
2022-10-22 01:49:09 +03:00
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;
};
};
2022-09-12 03:32:23 +03:00
in {
options = {
2022-10-04 02:08:44 +03:00
settings.iconTheme = {
name = l.mkOption {
type = t.str;
};
package = l.mkOption {
type = t.package;
};
};
2022-09-12 03:32:23 +03:00
settings.terminal = {
2022-10-04 02:08:44 +03:00
name = l.mkOption {
type = t.str;
2022-09-12 03:32:23 +03:00
};
2022-11-27 01:04:43 +03:00
binary = l.mkOption {
type = t.path;
};
2022-09-12 03:32:23 +03:00
};
settings.font = {
2022-10-22 01:49:09 +03:00
regular = fontSettings;
monospace = fontSettings;
2022-07-01 04:45:26 +03:00
};
2022-09-12 03:32:23 +03:00
};
2022-07-01 04:45:26 +03:00
2022-10-22 01:49:09 +03:00
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}";
2022-09-12 03:32:23 +03:00
};
}