modules: system: language: make it configurable

This commit is contained in:
Bruno BELANYI 2021-05-29 20:23:19 +02:00
parent a3eaa6d97e
commit 565d40fefb

View file

@ -1,7 +1,22 @@
# Language settings # Language settings
{ ... }: { config, lib, ... }:
let
cfg = config.my.system.language;
in
{ {
# Select internationalisation properties. options.my.system.language = with lib; {
i18n.defaultLocale = "en_US.UTF-8"; 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;
};
} }