Skip to content

Commit

Permalink
introduce rime cantonia
Browse files Browse the repository at this point in the history
Signed-off-by: iosmanthus <[email protected]>
  • Loading branch information
iosmanthus committed Mar 29, 2024
1 parent 36f65d8 commit cde9553
Show file tree
Hide file tree
Showing 97 changed files with 2,757,358 additions and 324 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ switch:
@nixos-rebuild switch --use-remote-sudo |& nom

format:
@fd ".nix" --exec-batch "nixpkgs-fmt"
@fd ".py" --exec-batch "yapf" "-i"
@fd --glob "*.nix" --exec-batch "nixpkgs-fmt"
@fd --glob "*.py" --exec-batch "yapf" "-i"

update:
@nix flake update
Expand Down
22 changes: 19 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};

nur.url = "github:nix-community/NUR";
};
outputs =
{ self
Expand All @@ -48,6 +50,7 @@
, base16
, code-insiders
, nixos-generators
, nur
, ...
}@inputs:
let
Expand Down Expand Up @@ -95,6 +98,7 @@

berberman.overlays.default
code-insiders.overlays.default
nur.overlay
];
}
];
Expand Down
1 change: 1 addition & 0 deletions modules/cloud/sing-box/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let
"netflix"
"openai"
"youtube"
"stripe"
];

settings = {
Expand Down
13 changes: 2 additions & 11 deletions nixos/workstation/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@
};
};

i18n = {
defaultLocale = "en_US.UTF-8";
inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-chinese-addons
];
};
};

console = { keyMap = "us"; };

time.timeZone = "Asia/Shanghai";
Expand Down Expand Up @@ -159,7 +149,8 @@
docker = {
enable = true;
extraOptions = ''
--default-ulimit nofile=1048576:1048576 --bip "172.17.0.1/24" --storage-driver btrfs
--ipv6 --fixed-cidr-v6 fd00::/80 --default-ulimit nofile=1048576:1048576 \
--bip "172.17.0.1/24" --storage-driver btrfs
'';
};
libvirtd = { enable = true; };
Expand Down
1 change: 1 addition & 0 deletions nixos/workstation/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
imports = [
./fonts.nix
./monitors.nix
./fcitx5.nix
];

environment.variables = {
Expand Down
59 changes: 59 additions & 0 deletions nixos/workstation/desktop/fcitx5.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{ pkgs
, ...
}: {
i18n = {
defaultLocale = "en_US.UTF-8";
inputMethod = {
enabled = "fcitx5";
fcitx5 = {
addons = with pkgs; [
fcitx5-adwaita-dark
(fcitx5-rime.override {
rimeDataPkgs = pkgs.rime-data-cantonia;
})
];

settings = {
globalOptions = {
"Hotkey" = {
"ActivateKeys" = "";
"DeactivateKeys" = "";
"EnumerateBackwardKeys" = "";
"EnumerateForwardKeys" = "";
"EnumerateGroupBackwardKeys" = "";
"EnumerateGroupForwardKeys" = "";
"NextPage" = "";
"PrevPage" = "";

"EnumerateSkipFirst" = "False";
"EnumerateWithTriggerKeys" = "True";
};
"Hotkey/TriggerKeys" = {
"0" = "Shift+space";
};
"Hotkey/AltTriggerKeys" = {
"0" = "Shift_L";
};
};

addons = {
classicui.globalSection = {
"Vertical Candidate List" = "True";
"PerScreenDPI" = "True";
"WheelForPaging" = "True";
"Font" = "monospace 14";
"MenuFont" = "Microsoft YaHei 14";
"TrayFont" = "Sans Bold 10";
"TrayOutlineColor" = "#000000";
"TrayTextColor" = "#ffffff";
"PreferTextIcon" = "False";
"ShowLayoutNameInIcon" = "True";
"UseInputMethodLangaugeToDisplayText" = "True";
"Theme" = "adwaita-dark";
};
};
};
};
};
};
}
12 changes: 0 additions & 12 deletions nixos/workstation/home/fcitx5/chttrans.conf

This file was deleted.

25 changes: 0 additions & 25 deletions nixos/workstation/home/fcitx5/classicui.conf

This file was deleted.

7 changes: 0 additions & 7 deletions nixos/workstation/home/fcitx5/clipboard.conf

This file was deleted.

9 changes: 0 additions & 9 deletions nixos/workstation/home/fcitx5/cloudpinyin.conf

This file was deleted.

65 changes: 0 additions & 65 deletions nixos/workstation/home/fcitx5/config

This file was deleted.

48 changes: 0 additions & 48 deletions nixos/workstation/home/fcitx5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
with lib ;
let
fcitx5Home = "${config.xdg.configHome}/fcitx5";
mkDictPath = pkg: name: "${pkg}/share/fcitx5/pinyin/dictionaries/${name}.dict";
in
{
home.packages = with pkgs; [
Expand All @@ -18,52 +17,5 @@ in
src = ./profile;
dst = "${fcitx5Home}/profile";
};

fcitx5-config = {
src = ./config;
dst = "${fcitx5Home}/config";
};

fcitx5-chttrans = {
src = ./chttrans.conf;
dst = "${fcitx5Home}/conf/chttrans.conf";
};

fcitx5-clipboard = {
src = ./clipboard.conf;
dst = "${fcitx5Home}/conf/clipboard.conf";
};

fcitx5-cloudpinyin = {
src = ./cloudpinyin.conf;
dst = "${fcitx5Home}/conf/cloudpinyin.conf";
};

fcitx5-notifications = {
src = ./notifications.conf;
dst = "${fcitx5Home}/conf/notifications.conf";
};

fcitx5-pinyin = {
src = ./pinyin.conf;
dst = "${fcitx5Home}/conf/pinyin.conf";
};

fcitx5-punctuation = {
src = ./punctuation.conf;
dst = "${fcitx5Home}/conf/punctuation.conf";
};

fcitx5-classicui = {
src = ./classicui.conf;
dst = "${fcitx5Home}/conf/classicui.conf";
};
};

xdg.dataFile =
{
"fcitx5/themes/fcitx5-adwaita-dark".source = pkgs.fcitx5-adwaita-dark;
"fcitx5/pinyin/dictionaries/zhwiki.dict".source = mkDictPath pkgs.fcitx5-pinyin-zhwiki "zhwiki";
"fcitx5/pinyin/dictionaries/moegirl.dict".source = mkDictPath pkgs.fcitx5-pinyin-moegirl "moegirl";
};
}
3 changes: 0 additions & 3 deletions nixos/workstation/home/fcitx5/notifications.conf

This file was deleted.

Loading

0 comments on commit cde9553

Please sign in to comment.