nix-conf/system/locale.nix
2025-01-20 11:41:01 -06:00

38 lines
840 B
Nix

{
config,
lib,
pkgs,
...
}: {
i18n.defaultLocale = "en_US.UTF-8";
i18n.glibcLocales =
(pkgs.glibcLocales.overrideAttrs (finalAttrs: previousAttrs: {
preBuild = builtins.replaceStrings ["false"] ["# false"] previousAttrs.preBuild;
}))
.override {
locales = config.i18n.supportedLocales;
allLocales = false;
};
i18n.supportedLocales = [
"en_US.UTF-8/UTF-8"
"ja_JP.UTF-8/UTF-8"
"ja_JP.SJIS/SHIFT_JIS"
];
i18n.inputMethod = lib.mkIf config.u.has.graphical {
enable = true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
];
};
fonts.packages = with pkgs;
lib.optionals config.u.has.graphical [
noto-fonts
noto-fonts-cjk-sans
source-han-sans
source-han-serif
nerd-fonts.jetbrains-mono
];
}