mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 09:18:35 +02:00
feat: replace home.activation.xxx via home.file.<name>.force
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# https://git-scm.com/docs/git-config#Documentation/git-config.txt---global
|
# https://git-scm.com/docs/git-config#Documentation/git-config.txt---global
|
||||||
home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||||
rm -f ~/.gitconfig
|
rm -f ${config.home.homeDirectory}/.gitconfig
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|||||||
@@ -1,18 +1,11 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# remove existing rime data (squirrel)
|
|
||||||
home.activation.removeExistingRimeData = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
|
||||||
rm -rf "${config.home.homeDirectory}/Library/Rime/build/flypy.prism.bin"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Squirrel Input Method
|
# Squirrel Input Method
|
||||||
home.file."Library/Rime" = {
|
home.file."Library/Rime" = {
|
||||||
# my custom squirrel data (flypy input method)
|
# my custom squirrel data (flypy input method)
|
||||||
source = "${pkgs.flypy-squirrel}/share/rime-data";
|
source = "${pkgs.flypy-squirrel}/share/rime-data";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
# overwrite possible existing data dynamically generated by squirrel
|
||||||
|
# https://github.com/nix-community/home-manager/blob/release-23.05/modules/lib/file-type.nix#L101-L111
|
||||||
|
force = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
catppuccin-fcitx5,
|
catppuccin-fcitx5,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.file.".config/fcitx5/profile".source = ./profile;
|
home.file.".config/fcitx5/profile" = {
|
||||||
|
source = ./profile;
|
||||||
|
# every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile,
|
||||||
|
# so we need to force replace it in every rebuild to avoid file conflict.
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
|
|
||||||
# color schema
|
# color schema
|
||||||
home.file.".local/share/fcitx5/themes".source = "${catppuccin-fcitx5}/src";
|
home.file.".local/share/fcitx5/themes".source = "${catppuccin-fcitx5}/src";
|
||||||
home.file.".config/fcitx5/conf/classicui.conf".source = ./classicui.conf;
|
home.file.".config/fcitx5/conf/classicui.conf".source = ./classicui.conf;
|
||||||
|
|
||||||
# every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile file,
|
|
||||||
# which will override my config managed by home-manager
|
|
||||||
# so we need to remove it before everytime we rebuild the config
|
|
||||||
home.activation.removeExistingFcitx5Profile = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
|
||||||
rm -f "${config.xdg.configHome}/fcitx5/profile"
|
|
||||||
'';
|
|
||||||
|
|
||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
enabled = "fcitx5";
|
enabled = "fcitx5";
|
||||||
fcitx5.addons = with pkgs; [
|
fcitx5.addons = with pkgs; [
|
||||||
|
|||||||
Reference in New Issue
Block a user