2024-07-08 00:50:50 +00:00
|
|
|
{ lib, config, ... }:
|
|
|
|
let
|
|
|
|
inherit (lib)
|
2024-07-08 15:26:25 +00:00
|
|
|
mkOption
|
2024-07-08 00:50:50 +00:00
|
|
|
types
|
|
|
|
;
|
|
|
|
|
|
|
|
cfg = config.i18n;
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
i18n = {
|
2024-07-08 15:26:25 +00:00
|
|
|
localeSettings = mkOption {
|
2024-07-08 00:50:50 +00:00
|
|
|
type = types.attrsOf types.str;
|
|
|
|
description = "The system wide locale settings";
|
|
|
|
default = {};
|
|
|
|
};
|
|
|
|
|
2024-07-08 15:26:25 +00:00
|
|
|
locales = mkOption {
|
2024-07-08 00:50:50 +00:00
|
|
|
type = types.listOf types.str;
|
|
|
|
description = "The locales of the system";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
2024-07-08 15:26:25 +00:00
|
|
|
i18n.locales = builtins.attrValues cfg.localeSettings;
|
2024-07-08 00:50:50 +00:00
|
|
|
};
|
|
|
|
}
|