refactor *started*
This commit is contained in:
parent
d0413cb830
commit
db2103a37d
103 changed files with 1008 additions and 786 deletions
51
modules/system/localization.nix
Normal file
51
modules/system/localization.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
timezone = config.system.timezone;
|
||||
language = config.system.language;
|
||||
locale = config.system.locale;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
system = {
|
||||
timezone = lib.mkOption {
|
||||
default = "Europe/Berlin";
|
||||
description = "timezone";
|
||||
};
|
||||
language = lib.mkOption {
|
||||
default = "en_GB.UTF-8";
|
||||
description = "language";
|
||||
};
|
||||
locale = lib.mkOption {
|
||||
default = "de_DE.UTF-8";
|
||||
description = "locale";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
time.timeZone = timezone;
|
||||
i18n = {
|
||||
defaultLocale = language;
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = locale;
|
||||
LC_IDENTIFICATION = locale;
|
||||
LC_MEASUREMENT = locale;
|
||||
LC_MONETARY = locale;
|
||||
LC_NAME = locale;
|
||||
LC_NUMERIC = locale;
|
||||
LC_PAPER = locale;
|
||||
LC_TELEPHONE = locale;
|
||||
LC_TIME = locale;
|
||||
};
|
||||
};
|
||||
console.keyMap = builtins.substring 0 2 locale;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue