mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
home-environment: add full locale options support
Allows setting every locale option independently. Also fixes `LC_` order to match the order of `locale` command output for better reference. PR #1278
This commit is contained in:
parent
ba91ac5948
commit
479274775f
1 changed files with 77 additions and 6 deletions
|
@ -16,11 +16,35 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
address = mkOption {
|
ctype = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The language to use for addresses.
|
Character classification category.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
numeric = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
The language to use for numerical values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
time = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
The language to use for formatting times.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
collate = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
The language to use for collation (alphabetical ordering).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,6 +56,14 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
messages = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
The language to use for messages, application UI languages, etc.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
paper = mkOption {
|
paper = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
|
@ -40,13 +72,38 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
time = mkOption {
|
name = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The language to use for formatting times.
|
The language to use for personal names.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
address = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
The language to use for addresses.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
telephone = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
The language to use for telephone numbers.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
measurement = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
The language to use for measurement values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -354,13 +411,27 @@ in
|
||||||
in
|
in
|
||||||
(maybeSet "LANG" cfg.language.base)
|
(maybeSet "LANG" cfg.language.base)
|
||||||
//
|
//
|
||||||
(maybeSet "LC_ADDRESS" cfg.language.address)
|
(maybeSet "LC_CTYPE" cfg.language.ctype)
|
||||||
|
//
|
||||||
|
(maybeSet "LC_NUMERIC" cfg.language.numeric)
|
||||||
|
//
|
||||||
|
(maybeSet "LC_TIME" cfg.language.time)
|
||||||
|
//
|
||||||
|
(maybeSet "LC_COLLATE" cfg.language.collate)
|
||||||
//
|
//
|
||||||
(maybeSet "LC_MONETARY" cfg.language.monetary)
|
(maybeSet "LC_MONETARY" cfg.language.monetary)
|
||||||
//
|
//
|
||||||
|
(maybeSet "LC_MESSAGES" cfg.language.messages)
|
||||||
|
//
|
||||||
(maybeSet "LC_PAPER" cfg.language.paper)
|
(maybeSet "LC_PAPER" cfg.language.paper)
|
||||||
//
|
//
|
||||||
(maybeSet "LC_TIME" cfg.language.time);
|
(maybeSet "LC_NAME" cfg.language.name)
|
||||||
|
//
|
||||||
|
(maybeSet "LC_ADDRESS" cfg.language.address)
|
||||||
|
//
|
||||||
|
(maybeSet "LC_TELEPHONE" cfg.language.telephone)
|
||||||
|
//
|
||||||
|
(maybeSet "LC_MEASUREMENT" cfg.language.measurement);
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
# Provide a file holding all session variables.
|
# Provide a file holding all session variables.
|
||||||
|
|
Loading…
Reference in a new issue