add japanese fonts and input
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
./podman
|
||||
./yubikey
|
||||
./tailscale
|
||||
./japanese
|
||||
./vpns
|
||||
./vpn-confinement
|
||||
./syncthing
|
||||
|
||||
52
modules/system/japanese/default.nix
Normal file
52
modules/system/japanese/default.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.system.japanese;
|
||||
in {
|
||||
options.system.japanese = {
|
||||
enable = lib.mkEnableOption "enables japanese tools";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# japanese input
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
fcitx5-qt
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
fcitx5
|
||||
fcitx5-configtool
|
||||
];
|
||||
|
||||
# fonts for japanese
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
source-han-sans
|
||||
source-han-serif
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = [ "Noto Serif CJK JP" ];
|
||||
sansSerif = [ "Noto Sans CJK JP" ];
|
||||
monospace = [ "Noto Sans Mono CJK JP" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user