forked from jan-leila/nix-config
moved local to modules
This commit is contained in:
parent
bc53ae6ee2
commit
4d191a27cc
12 changed files with 90 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./flipperzero.nix
|
||||
./i18n.nix
|
||||
];
|
||||
}
|
||||
|
|
42
home-modules/i18n.nix
Normal file
42
home-modules/i18n.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
i18n = {
|
||||
defaultLocale = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "en_US.UTF-8";
|
||||
example = "nl_NL.UTF-8";
|
||||
description = ''
|
||||
The default locale. It determines the language for program
|
||||
messages, the format for dates and times, sort order, and so on.
|
||||
It also determines the character set, such as UTF-8.
|
||||
'';
|
||||
};
|
||||
|
||||
extraLocaleSettings = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = {};
|
||||
example = {
|
||||
LC_MESSAGES = "en_US.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
description = ''
|
||||
A set of additional system-wide locale settings other than
|
||||
`LANG` which can be configured with
|
||||
{option}`i18n.defaultLocale`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home.sessionVariables =
|
||||
{
|
||||
LANG = config.i18n.defaultLocale;
|
||||
}
|
||||
// config.i18n.extraLocaleSettings;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue