mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 08:28:11 +09:00
add fcitx5, ghostty, git
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
home.file.".config/fcitx5/config" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ./config;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
i18n.inputMethod = {
|
||||||
|
enable = true;
|
||||||
|
type = "fcitx5";
|
||||||
|
|
||||||
|
fcitx5 = {
|
||||||
|
waylandFrontend = true;
|
||||||
|
addons = with pkgs; [
|
||||||
|
fcitx5-mozc-ut
|
||||||
|
fcitx5-gtk
|
||||||
|
kdePackages.fcitx5-qt
|
||||||
|
qt6Packages.fcitx5-configtool
|
||||||
|
];
|
||||||
|
|
||||||
|
settings.inputMethod = {
|
||||||
|
GroupOrder."0" = "Default";
|
||||||
|
"Groups/0" = {
|
||||||
|
Name = "Default";
|
||||||
|
"Default Layout" = "jp";
|
||||||
|
DefaultIM = "mozc";
|
||||||
|
};
|
||||||
|
"Groups/0/Items/0" = {
|
||||||
|
Name = "keyboard-jp";
|
||||||
|
Layout = "";
|
||||||
|
};
|
||||||
|
"Groups/0/Items/1" = {
|
||||||
|
Name = "mozc";
|
||||||
|
Layout = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
homebrew = {
|
||||||
|
enable = true;
|
||||||
|
casks = [ "ghostty" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
# MIT License
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Dracula Theme
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in all
|
||||||
|
# copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
palette = 0=#21222c
|
||||||
|
palette = 1=#ff5555
|
||||||
|
palette = 2=#50fa7b
|
||||||
|
palette = 3=#f1fa8c
|
||||||
|
palette = 4=#bd93f9
|
||||||
|
palette = 5=#ff79c6
|
||||||
|
palette = 6=#8be9fd
|
||||||
|
palette = 7=#f8f8f2
|
||||||
|
palette = 8=#6272a4
|
||||||
|
palette = 9=#ff6e6e
|
||||||
|
palette = 10=#69ff94
|
||||||
|
palette = 11=#ffffa5
|
||||||
|
palette = 12=#d6acff
|
||||||
|
palette = 13=#ff92df
|
||||||
|
palette = 14=#a4ffff
|
||||||
|
palette = 15=#ffffff
|
||||||
|
background = #282a36
|
||||||
|
foreground = #f8f8f2
|
||||||
|
cursor-color = #f8f8f2
|
||||||
|
cursor-text = #282a36
|
||||||
|
selection-foreground = #f8f8f2
|
||||||
|
selection-background = #44475a
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
package =
|
||||||
|
if pkgs.stdenv.hostPlatform.isLinux then
|
||||||
|
inputs.ghostty.packages.${pkgs.stdenv.hostPlatform.system}.ghostty-releasefast
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.ghostty = {
|
||||||
|
enable = true;
|
||||||
|
inherit package;
|
||||||
|
systemd.enable = pkgs.stdenv.hostPlatform.isLinux;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
theme = "dracula";
|
||||||
|
background-blur-radius = 20;
|
||||||
|
background-opacity = 0.9;
|
||||||
|
font-family = "BlexMono Nerd Font Mono";
|
||||||
|
mouse-hide-while-typing = true;
|
||||||
|
window-decoration = "auto";
|
||||||
|
|
||||||
|
keybind = [
|
||||||
|
"performable:ctrl+shift+c=copy_to_clipboard"
|
||||||
|
"ctrl+shift+v=paste_from_clipboard"
|
||||||
|
"ctrl+shift+t=new_tab"
|
||||||
|
"ctrl+alt+left_bracket=previous_tab"
|
||||||
|
"ctrl+alt+right_bracket=next_tab"
|
||||||
|
"ctrl+alt+q=close_window"
|
||||||
|
"ctrl+shift+semicolon=increase_font_size:1"
|
||||||
|
"ctrl+shift+minus=decrease_font_size:1"
|
||||||
|
];
|
||||||
|
|
||||||
|
quick-terminal-position = "top";
|
||||||
|
quick-terminal-size = "98%,100%";
|
||||||
|
quick-terminal-autohide = false;
|
||||||
|
quick-terminal-keyboard-interactivity = "on-demand";
|
||||||
|
gtk-quick-terminal-layer = "top";
|
||||||
|
quit-after-last-window-closed = false;
|
||||||
|
shell-integration-features = "no-ssh-env,no-ssh-terminfo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."ghostty/themes/dracula".source = ./dracula.theme;
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
signingKeyPath = ".ssh/1password-git-signing.pub";
|
||||||
|
signingKeyFile = "~/${signingKeyPath}";
|
||||||
|
|
||||||
|
gitSshSign = pkgs.writeShellScript "git-ssh-sign" ''
|
||||||
|
one_password_sock="$HOME/.1password/agent.sock"
|
||||||
|
|
||||||
|
if { [ -n "''${SSH_CONNECTION:-}" ] || [ -n "''${SSH_CLIENT:-}" ]; } \
|
||||||
|
&& [ -n "''${SSH_AUTH_SOCK:-}" ] \
|
||||||
|
&& [ -S "$SSH_AUTH_SOCK" ]; then
|
||||||
|
exec ${pkgs.openssh}/bin/ssh-keygen "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -S "$one_password_sock" ]; then
|
||||||
|
export SSH_AUTH_SOCK="$one_password_sock"
|
||||||
|
exec ${pkgs.openssh}/bin/ssh-keygen "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "''${SSH_AUTH_SOCK:-}" ] && [ -S "$SSH_AUTH_SOCK" ]; then
|
||||||
|
exec ${pkgs.openssh}/bin/ssh-keygen "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "git ssh signing failed: no forwarded SSH agent or 1Password agent socket found" >&2
|
||||||
|
echo "expected: forwarded SSH_AUTH_SOCK or $one_password_sock" >&2
|
||||||
|
exit 1
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.gh ];
|
||||||
|
|
||||||
|
home.file.${signingKeyPath}.text = ''
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLwReAiwhXoO34S2+MrvqUhi8IWp4IzUq4OSp3niJdq 1password-git-signing
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
ignores = [
|
||||||
|
".direnv/"
|
||||||
|
".envrc"
|
||||||
|
"!.envrc.example"
|
||||||
|
];
|
||||||
|
|
||||||
|
signing = {
|
||||||
|
key = signingKeyFile;
|
||||||
|
format = "ssh";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
name = "moons";
|
||||||
|
email = "moons@moons14.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
push.default = "simple";
|
||||||
|
credential.helper = "cache --timeout=7200";
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
log.decorate = "full";
|
||||||
|
log.date = "iso";
|
||||||
|
merge.conflictStyle = "diff3";
|
||||||
|
|
||||||
|
gpg.ssh.program = "${gitSshSign}";
|
||||||
|
|
||||||
|
alias = {
|
||||||
|
br = "branch --sort=-committerdate";
|
||||||
|
co = "checkout";
|
||||||
|
df = "diff";
|
||||||
|
com = "commit -a";
|
||||||
|
gs = "stash";
|
||||||
|
gp = "pull";
|
||||||
|
lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit";
|
||||||
|
st = "status";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user