diff --git a/flake.lock b/flake.lock index 7dccc82..9facb49 100644 --- a/flake.lock +++ b/flake.lock @@ -500,22 +500,6 @@ } }, "nixpkgs_10": { - "locked": { - "lastModified": 1750386251, - "narHash": "sha256-1ovgdmuDYVo5OUC5NzdF+V4zx2uT8RtsgZahxidBTyw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "076e8c6678d8c54204abcb4b1b14c366835a58bb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_11": { "locked": { "lastModified": 1743568003, "narHash": "sha256-ZID5T65E8ruHqWRcdvZLsczWDOAWIE7om+vQOREwiX0=", @@ -797,20 +781,23 @@ }, "sydpkgs": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1767975357, - "narHash": "sha256-MDVh3/aVhkD1bh/r8c0gs9DL4e78CrUbUxOZHWlCwLM=", - "owner": "msyds", - "repo": "sydpkgs", - "rev": "233479ab277d47b1dbda202eafca50e61c659151", - "type": "github" + "lastModified": 1773275674, + "narHash": "sha256-kULSjFWDoDatz31aIses5q51ESUi0ASUc3MKmBYLnRY=", + "ref": "fcitx5-toki-pona", + "rev": "03f6a67a0a3b3c00ff4566147eddb0123cfe3d14", + "revCount": 38, + "type": "git", + "url": "https://git.deertopia.net/msyds/sydpkgs" }, "original": { - "owner": "msyds", - "repo": "sydpkgs", - "type": "github" + "ref": "fcitx5-toki-pona", + "type": "git", + "url": "https://git.deertopia.net/msyds/sydpkgs" } }, "systems": { @@ -861,7 +848,7 @@ "tf2-nix": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_11" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1761467191, diff --git a/flake.nix b/flake.nix index a0fb48c..89858a2 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,10 @@ tf2-nix.url = "gitlab:msyds/tf2-nix"; syd-fcitx5-tables.url = "git+https://git.deertopia.net/msyds/syd-fcitx5-tables"; - sydpkgs.url = "github:msyds/sydpkgs"; + sydpkgs = { + url = "git+https://git.deertopia.net/msyds/sydpkgs?ref=fcitx5-toki-pona"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, ... }@inputs: diff --git a/modules/home/toki-pona.nix b/modules/home/toki-pona.nix new file mode 100644 index 0000000..73951f6 --- /dev/null +++ b/modules/home/toki-pona.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: + +let cfg = config.sydnix.toki-pona; +in { + options.sydnix.toki-pona = { + enable = lib.mkEnableOption "Toki Pona fonts and input methods"; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + # nasin-nanpa-ucsur + nasin-nanpa + nasin-nanpa-helvetica + ]; + }; +} diff --git a/modules/home/users/crumb/fcitx5.nix b/modules/home/users/crumb/fcitx5.nix index c6be6c6..748e096 100644 --- a/modules/home/users/crumb/fcitx5.nix +++ b/modules/home/users/crumb/fcitx5.nix @@ -18,6 +18,11 @@ in { pkgs.kdePackages.fcitx5-chinese-addons pkgs.fcitx5-hangul inputs.syd-fcitx5-tables.packages.${system}.default + (pkgs.fcitx5-toki-pona.overrideAttrs (final: prev: { + patches = prev.patches or [] ++ [ + ./fcitx5/punctuation.patch + ]; + })) ]; settings = { # Bind QuickPhrase to `s-;`. @@ -26,8 +31,8 @@ in { }; globalOptions = { - # Disable shift to toggle. I accidentally press it all the time. - # 날 미치게 만들어요. + # Disable shift to toggle. I accidentally press it all + # the time. 날 미치게 만들어요. Hotkey.AltTriggerKeys = ""; }; diff --git a/modules/home/users/crumb/fcitx5/punctuation.patch b/modules/home/users/crumb/fcitx5/punctuation.patch new file mode 100644 index 0000000..b47b9bd --- /dev/null +++ b/modules/home/users/crumb/fcitx5/punctuation.patch @@ -0,0 +1,22 @@ +diff --git a/static_tables/toki_pona_ucsur.txt b/static_tables/toki_pona_ucsur.txt +index 1bacd3a..53f5c8e 100644 +--- a/static_tables/toki_pona_ucsur.txt ++++ b/static_tables/toki_pona_ucsur.txt +@@ -1,4 +1,4 @@ +-KeyCode=mnptkswljiueoa()[]{}^*.:"-_ ++KeyCode=mnptkswljiueoa()[]{}^*.:"-_<>, + Length=16 + Prompt= + ConstructPhrase= +@@ -13,8 +13,11 @@ _   + ^ 󱦕 + * 󱦖 + . 󱦜 ++, 。 + : 󱦝  + - ‍ ++< 「 ++> 」 + a 󱤀 + akesi 󱤁 + ala 󱤂 diff --git a/users/msyds/default.nix b/users/msyds/default.nix index 7f4b1fe..e85c866 100644 --- a/users/msyds/default.nix +++ b/users/msyds/default.nix @@ -41,6 +41,7 @@ terraria.enable = true; kdeconnect.enable = true; qalculate.enable = true; + toki-pona.enable = true; sops = { enable = true; keyFile = "/persist/private-keys/age/crumb";