feat(home-manager): init fcitx5 module (#128)

This commit is contained in:
Leah Amelia Chen 2024-04-18 21:49:10 +02:00 committed by GitHub
parent 75663896d0
commit b35a03410d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 69 additions and 0 deletions

View file

@ -139,6 +139,26 @@
},
"version": "bfec91a5d0ab02a73a4615243feb5499d376831c"
},
"fcitx5": {
"cargoLocks": null,
"date": "2022-10-05",
"extract": null,
"name": "fcitx5",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "catppuccin",
"repo": "fcitx5",
"rev": "ce244cfdf43a648d984719fdfd1d60aab09f5c97",
"sha256": "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=",
"type": "github"
},
"version": "ce244cfdf43a648d984719fdfd1d60aab09f5c97"
},
"fish": {
"cargoLocks": null,
"date": "2023-11-02",

View file

@ -85,6 +85,18 @@
};
date = "2024-04-07";
};
fcitx5 = {
pname = "fcitx5";
version = "ce244cfdf43a648d984719fdfd1d60aab09f5c97";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "fcitx5";
rev = "ce244cfdf43a648d984719fdfd1d60aab09f5c97";
fetchSubmodules = false;
sha256 = "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=";
};
date = "2022-10-05";
};
fish = {
pname = "fish";
version = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e";

View file

@ -0,0 +1,28 @@
{ config
, lib
, sources
, ...
}:
let
inherit (lib) ctp;
cfg = config.i18n.inputMethod.fcitx5.catppuccin;
enable = cfg.enable && config.i18n.inputMethod.enabled == "fcitx5";
in
{
options.i18n.inputMethod.fcitx5.catppuccin = ctp.mkCatppuccinOpt "Fcitx5";
config = lib.mkIf enable {
assertions = [
(ctp.assertXdgEnabled "Fcitx5")
];
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavour}" = {
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavour}";
recursive = true;
};
xdg.configFile."fcitx5/conf/classicui.conf".text = lib.generators.toINIWithGlobalSection { } {
globalSection.Theme = "catppuccin-${cfg.flavour}";
};
};
}

View file

@ -26,6 +26,10 @@ fetch.github = "catppuccin/delta"
src.git = "https://github.com/catppuccin/dunst.git"
fetch.github = "catppuccin/dunst"
[fcitx5]
src.git = "https://github.com/catppuccin/fcitx5.git"
fetch.github = "catppuccin/fcitx5"
[fish]
src.git = "https://github.com/catppuccin/fish.git"
fetch.github = "catppuccin/fish"

View file

@ -53,6 +53,11 @@ in
manual.manpages.enable = lib.mkDefault false;
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.catppuccin.enable = true;
};
programs = {
alacritty = ctpEnable;
bat = ctpEnable;