modules/locale: add locale module
This commit is contained in:
parent
5e6e7d1648
commit
c9835984c0
2 changed files with 22 additions and 7 deletions
22
modules/modules/locale.nix
Normal file
22
modules/modules/locale.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, options, lib, ... }:
|
||||
with lib;
|
||||
with lib.hlissner;
|
||||
let
|
||||
cfg = config.modules.locale;
|
||||
in
|
||||
{
|
||||
options.modules.locale = {
|
||||
keymap = mkOpt "us";
|
||||
locale = mkOpt "en_us.UTF-8";
|
||||
timezone = mkOpt "America/New_York";
|
||||
};
|
||||
|
||||
config = {
|
||||
console.keyMap = mkDefault cfg.keymap;
|
||||
services.xserver.layout = mkDefault cfg.keymap;
|
||||
|
||||
i18n.defaultLocale = cfg.locale;
|
||||
|
||||
time.timeZone = cfg.timezone;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue