From f78f23e9acdeb4718ab868520ee4d474f0887520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 20 Mar 2022 15:39:46 +0100 Subject: [PATCH] feat: Start ibus as a systemd service --- config/programs/ibus.nix | 26 ++++++++++++++++++++++++++ config/programs/sway.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 config/programs/ibus.nix diff --git a/config/programs/ibus.nix b/config/programs/ibus.nix new file mode 100644 index 00000000..68ec7a78 --- /dev/null +++ b/config/programs/ibus.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +let + ibusPackage = pkgs.ibus-with-plugins.override { + plugins = with pkgs.ibus-engines; [ + mozc + table + table-others + uniemoji + ]; + }; +in +{ + systemd.user.services.ibus = { + Unit = { + Description = "IBus daemon"; + PartOf = [ "graphical-session.target" ]; + Requires = [ "dbus.socket" ]; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${ibusPackage}/bin/ibus-daemon --xim"; + }; + }; +} diff --git a/config/programs/sway.nix b/config/programs/sway.nix index 547c6143..a0b43063 100644 --- a/config/programs/sway.nix +++ b/config/programs/sway.nix @@ -3,6 +3,7 @@ ./wl-clipboard.nix ./mako.nix ./swayidle.nix + ./ibus.nix ]; wayland.windowManager.sway = { enable = true;