i18n.inputMethod: add module

This commit is contained in:
Ilan Joselevich 2021-06-16 01:59:25 +03:00 committed by Robert Helgesson
parent ab0e6c3e0e
commit 7e2b1a42aa
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
15 changed files with 399 additions and 0 deletions

View file

@ -88,6 +88,7 @@ import nmt {
./modules/targets-darwin
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
./modules/config/i18n
./modules/i18n/input-method
./modules/misc/debug
./modules/misc/gtk
./modules/misc/numlock

View file

@ -0,0 +1 @@
{ input-method-fcitx5-configuration = ./fcitx5-configuration.nix; }

View file

@ -0,0 +1,15 @@
{ config, pkgs, ... }:
{
config = {
nixpkgs.overlays = [ (import ./fcitx5-overlay.nix) ];
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ];
};
nmt.script = ''
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service
'';
};
}

View file

@ -0,0 +1,22 @@
final: prev:
let
dummy = prev.runCommandLocal "dummy-package" { } "mkdir $out";
in {
fcitx5 = prev.runCommandLocal "fcitx5" { version = "0"; } ''
mkdir -p $out/bin $out/share/applications $out/etc/xdg/autostart
touch $out/bin/fcitx5 \
$out/share/applications/org.fcitx.Fcitx5.desktop \
$out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop
chmod +x $out/bin/fcitx5
'';
fcitx5-configtool = dummy;
fcitx5-lua = dummy;
fcitx5-qt = dummy;
fcitx5-gtk = dummy;
fcitx5-with-addons =
prev.fcitx5-with-addons.override { inherit (final) fcitx5-qt; };
fcitx5-chinese-addons = dummy;
}