2021-02-06 15:35:38 +01:00
|
|
|
# Language settings
|
2021-05-29 20:23:19 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.system.language;
|
|
|
|
in
|
2021-02-06 15:35:38 +01:00
|
|
|
{
|
2021-05-29 20:23:19 +02:00
|
|
|
options.my.system.language = with lib; {
|
|
|
|
enable = my.mkDisableOption "language configuration";
|
|
|
|
|
|
|
|
locale = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "en_US.UTF-8";
|
|
|
|
example = "fr_FR.UTF-8";
|
|
|
|
description = "Which locale to use for the system";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
# Select internationalisation properties.
|
|
|
|
i18n.defaultLocale = cfg.locale;
|
|
|
|
};
|
2021-02-06 15:35:38 +01:00
|
|
|
}
|