Add input modules (greek and japanese)
This commit is contained in:
@@ -69,6 +69,11 @@ in
|
|||||||
system.kanata.enable = true;
|
system.kanata.enable = true;
|
||||||
system.devices.voyager.enable = true;
|
system.devices.voyager.enable = true;
|
||||||
|
|
||||||
|
system.input = {
|
||||||
|
japanese.enable = true;
|
||||||
|
greek.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# - Desktop ----------------------------------
|
# - Desktop ----------------------------------
|
||||||
desktop = {
|
desktop = {
|
||||||
inherit wallpaper;
|
inherit wallpaper;
|
||||||
@@ -76,8 +81,8 @@ in
|
|||||||
# Use Γραφείο (custom) desktop environment
|
# Use Γραφείο (custom) desktop environment
|
||||||
grapheio.enable = true;
|
grapheio.enable = true;
|
||||||
|
|
||||||
# Add greek keyboard layout
|
# # Add greek keyboard layout -- currently commented as fcitx5 adds greek support
|
||||||
wm.hyprland.kb_layout = "es,gr";
|
# wm.hyprland.kb_layout = "es,gr";
|
||||||
};
|
};
|
||||||
|
|
||||||
# - Editors and development ------------------
|
# - Editors and development ------------------
|
||||||
@@ -91,6 +96,7 @@ in
|
|||||||
dev.docker.users = ["marc"];
|
dev.docker.users = ["marc"];
|
||||||
|
|
||||||
# - Other apps -------------------------------
|
# - Other apps -------------------------------
|
||||||
|
app.anki.enable = true;
|
||||||
app.spotify.enable = true;
|
app.spotify.enable = true;
|
||||||
# app.skype.enable = true;
|
# app.skype.enable = true;
|
||||||
app.nextcloud.enable = true;
|
app.nextcloud.enable = true;
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ in {
|
|||||||
"${cfg.mod} SHIFT, 5, movetoworkspace, 5"
|
"${cfg.mod} SHIFT, 5, movetoworkspace, 5"
|
||||||
"${cfg.mod} SHIFT, 0, movetoworkspace, 6"
|
"${cfg.mod} SHIFT, 0, movetoworkspace, 6"
|
||||||
|
|
||||||
# - Keyboard ---------------------------
|
# # - Keyboard ---------------------------
|
||||||
"${cfg.mod}, Escape, exec, hyprctl switchxkblayout current next"
|
# "${cfg.mod}, Escape, exec, hyprctl switchxkblayout current next"
|
||||||
|
|
||||||
] ++ cfg.extraKeybindings;
|
] ++ cfg.extraKeybindings;
|
||||||
|
|
||||||
|
|||||||
39
modules/system/input/greek.nix
Normal file
39
modules/system/input/greek.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.system.input.greek;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.system.input.greek = {
|
||||||
|
enable = mkEnableOption "Enable greek input";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
i18n.inputMethod = {
|
||||||
|
type = "fcitx5";
|
||||||
|
enable = true;
|
||||||
|
fcitx5.addons = with pkgs; [
|
||||||
|
fcitx5-gtk
|
||||||
|
fcitx5-nord
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "fcitx";
|
||||||
|
QT_IM_MODULE = "fcitx";
|
||||||
|
XMODIFIERS = "@im=fcitx";
|
||||||
|
};
|
||||||
|
|
||||||
|
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
|
||||||
|
windowrule = "pseudo, class:fcitx";
|
||||||
|
exec-once = [
|
||||||
|
"fcitx -d -r"
|
||||||
|
"fcitx-remote -r"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
46
modules/system/input/japanese.nix
Normal file
46
modules/system/input/japanese.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.system.input.japanese;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.system.input.japanese = {
|
||||||
|
enable = mkEnableOption "Enable japanese input";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
i18n.inputMethod = {
|
||||||
|
type = "fcitx5";
|
||||||
|
enable = true;
|
||||||
|
fcitx5.addons = with pkgs; [
|
||||||
|
fcitx5-mozc-ut
|
||||||
|
fcitx5-gtk
|
||||||
|
fcitx5-nord
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
ipafont
|
||||||
|
kochi-substitute
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "fcitx";
|
||||||
|
QT_IM_MODULE = "fcitx";
|
||||||
|
XMODIFIERS = "@im=fcitx";
|
||||||
|
};
|
||||||
|
|
||||||
|
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
|
||||||
|
windowrule = "pseudo, class:fcitx";
|
||||||
|
exec-once = [
|
||||||
|
"fcitx -d -r"
|
||||||
|
"fcitx-remote -r"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user