grimm-nixos-laptop/common/localisation.nix

34 lines
801 B
Nix
Raw Normal View History

2024-04-10 16:51:28 +02:00
{ config, lib, ... }:
let
2024-05-11 22:55:59 +02:00
inherit (config.grimmShared) enable locale;
2024-04-10 16:51:28 +02:00
in
{
2024-05-11 22:55:59 +02:00
config = lib.mkIf (enable && locale) {
time.timeZone = "Europe/Berlin";
2024-03-24 16:59:47 +01:00
2024-05-11 22:55:59 +02:00
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
2024-04-10 16:51:28 +02:00
2024-05-11 22:55:59 +02:00
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
2024-03-24 16:59:47 +01:00
2024-05-11 22:55:59 +02:00
console.keyMap = "de";
2024-03-24 16:59:47 +01:00
2024-05-11 22:55:59 +02:00
services.xserver.xkb = {
layout = "de";
variant = "";
2024-03-24 16:59:47 +01:00
};
2024-05-11 22:55:59 +02:00
};
2024-04-26 22:03:03 +02:00
options.grimmShared.locale = lib.mkEnableOption "Sets german units but english language";
2024-03-24 16:59:47 +01:00
}