diff --git a/home/modules/i18n/default.nix b/home/modules/i18n/default.nix deleted file mode 100644 index 5dddd23..0000000 --- a/home/modules/i18n/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - osConfig ? null, - lib, - ... -}: -{ - config = lib.mkIf (osConfig != null) { - xdg.dataFile = { - "fcitx5/rime/default.custom.yaml".source = ./default.custom.yaml; - "fcitx5/rime/double_pinyin_flypy.custom.yaml".source = ./double_pinyin_flypy.custom.yaml; - "fcitx5/rime/yustar_sc.custom.yaml".source = ./yustar_sc.custom.yaml; - }; - }; -} diff --git a/nixos/modules/i18n.nix b/nixos/modules/i18n.nix index b71184f..22a9ff5 100644 --- a/nixos/modules/i18n.nix +++ b/nixos/modules/i18n.nix @@ -37,10 +37,7 @@ in fcitx5-fluent (fcitx5-rime.override { rimeDataPkgs = [ - rime-ice - rime-zhwiki - rime-moegirl - rime-yuhaostar + rime-all ]; }) ]; diff --git a/overlays/additions/default.nix b/overlays/additions/default.nix index 1ea4ffc..a73aec7 100644 --- a/overlays/additions/default.nix +++ b/overlays/additions/default.nix @@ -9,6 +9,7 @@ in ./editor-runtime.nix ./wallpapers.nix ./rime-yuhaostar.nix + ./rime-all.nix ./nixvim.nix ./doom-emacs.nix ./osu-lazer-bin.nix # typochecker: disable-line diff --git a/overlays/additions/rime-all.nix b/overlays/additions/rime-all.nix new file mode 100644 index 0000000..23675dc --- /dev/null +++ b/overlays/additions/rime-all.nix @@ -0,0 +1,8 @@ +{ outputs, ... }: +_final: prev: +let + inherit (prev.stdenv.hostPlatform) system; +in +{ + inherit (outputs.packages.${system}) rime-all; +} diff --git a/home/modules/i18n/default.custom.yaml b/pkgs/rime-all/default.custom.yaml similarity index 100% rename from home/modules/i18n/default.custom.yaml rename to pkgs/rime-all/default.custom.yaml diff --git a/home/modules/i18n/double_pinyin_flypy.custom.yaml b/pkgs/rime-all/double_pinyin_flypy.custom.yaml similarity index 100% rename from home/modules/i18n/double_pinyin_flypy.custom.yaml rename to pkgs/rime-all/double_pinyin_flypy.custom.yaml diff --git a/pkgs/rime-all/package.nix b/pkgs/rime-all/package.nix new file mode 100644 index 0000000..834d446 --- /dev/null +++ b/pkgs/rime-all/package.nix @@ -0,0 +1,21 @@ +{ + rime-ice, + rime-yuhaostar, + rime-moegirl, + rime-zhwiki, + buildEnv, +}: +buildEnv { + name = "rime-all"; + paths = [ + rime-ice + rime-yuhaostar + rime-zhwiki + rime-moegirl + ]; + postBuild = '' + ln -s ${./yustar_sc.custom.yaml} $out/share/rime-data/yustar_sc.custom.yaml + ln -s ${./double_pinyin_flypy.custom.yaml} $out/share/rime-data/double_pinyin_flypy.custom.yaml + ln -s ${./default.custom.yaml} $out/share/rime-data/default.custom.yaml + ''; +} diff --git a/home/modules/i18n/yustar_sc.custom.yaml b/pkgs/rime-all/yustar_sc.custom.yaml similarity index 100% rename from home/modules/i18n/yustar_sc.custom.yaml rename to pkgs/rime-all/yustar_sc.custom.yaml