summaryrefslogtreecommitdiff
path: root/modules/common/locale.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
commite6ed60548397627bf10f561f9438201dbba0a36e (patch)
treef9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/common/locale.nix
parent9ac64328603d44bd272175942d3ea3eaadcabd04 (diff)
2024-04-21
Diffstat (limited to 'modules/common/locale.nix')
-rw-r--r--modules/common/locale.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/common/locale.nix b/modules/common/locale.nix
new file mode 100644
index 0000000..7e8eefb
--- /dev/null
+++ b/modules/common/locale.nix
@@ -0,0 +1,46 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib;
+{
+ hm.home.language = {
+ collate = "C";
+ messages = "C";
+ };
+
+ i18n = {
+ defaultLocale = mkDefault "en_GB.UTF-8";
+ supportedLocales = [
+ "C.UTF-8/UTF-8"
+ "en_GB.UTF-8/UTF-8"
+ "en_US.UTF-8/UTF-8"
+ "ja_JP.UTF-8/UTF-8"
+ "ru_RU.UTF-8/UTF-8"
+ ];
+
+ inputMethod = {
+ enabled = null; # FIXME Breaks on Wayland.
+ fcitx5 = {
+ addons = with pkgs; [
+ fcitx5-configtool
+ fcitx5-mozc
+ ];
+ waylandFrontend = config.nixfiles.modules.wayland.enable;
+ };
+ };
+ };
+
+ services.xserver.xkb = {
+ layout = "us,ru";
+ variant = ",phonetic";
+ options = concatStringsSep "," [
+ "caps:escape"
+ "compose:menu"
+ "grp:win_space_toggle"
+ "terminate:ctrl_alt_bksp"
+ ];
+ };
+}