Repository navigation
Expand file tree
/
Copy pathfish.nix
More file actions
304 lines (243 loc) · 10.1 KB
/
Copy pathfish.nix
File metadata and controls
304 lines (243 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
{ pkgs }:
{
enable = true;
shellInit = ''
# fish_add_path $HOME/.local/share/
#
# fish_add_path $HOME/.config/v-analyzer/bin/
#
# fish_add_path /usr/local/bin
# fish_add_path $HOME/.local/bin
#
# fish_add_path $HOME/go/bin
#
# fish_add_path $HOME/.dotnet/tools
#
# fish_add_path $HOME/.npm-global/bin
#
# fish_add_path $HOME/ghq/github.com/emscripten-core/emsdk
# fish_add_path $HOME/ghq/github.com/emscripten-core/emsdk/upstream/emscripten
# fish_add_path $HOME/.codon/bin
# fish_add_path $HOME/.rye/shims
#
# fish_add_path $HOME/.local/share/gem/ruby/3.3.0/bin
# fish_add_path $HOME/.local/share/gem/ruby/3.0.0/bin
# fish_add_path $HOME/.local/share/gem/ruby/3.0.0/bin
#
# fish_add_path $HOME/.roswell/bin
#
# fish_add_path $HOME/.local/share/coursier/bin
#
# fish_add_path $HOME/.gleam/bin
fish_add_path $HOME/.bin/scripts/ime
# fish_add_path $HOME/.bin/scripts/ime
# fish_add_path $HOME/.bin/scripts/nowplaying
# fish_add_path $HOME/.bin/scripts/pywalfish_add_path
# fish_add_path $HOME/.bin/scripts/life
fish_add_path $HOME/.bin/scripts/ghq-attach
fish_add_path "$HOME/.moon/bin"
# fish_add_path $HOME/.bin/scripts/nowplaying
# fish_add_path $HOME/.roswell/bin/
# qlot
# fish_add_path $HOME/.local/share/qlot/bin
# gerbil
# set -gx GERBIL_INSTALL_PREFIX /usr/local/gerbil
# fish_add_path $GERBIL_INSTALL_PREFIX/bin
# fish_add_path $HOME/.gerbil/bin
# source $HOME/.kiex/elixirs/.elixir-1.16.0-rc.1.env.fish
# fish_add_path $HOME/.kiex/bin/
# fish_add_path $HOME/.kiex/elixirs/elixir-1.14/bin/
# fish_add_path $HOME/.kerl/26.2.1/bin/
#
# fish_add_path $HOME/.janet/bin
# fish_add_path $HOME/.bin/opam
# fish_add_path $HOME/.bin/mason
#
# fish_add_path $HOME/.wasmer/wasmer.sh
#
# fish_add_path $HOME/.local/share/aquaproj-aqua/bin/
# fish_add_path $AQUA_ROOT_DIR/bin
#
# fish_add_path $HOME/.konryu/versions/v0.1.1/cotowali/bin
# fish_add_path $HOME/go/bin/
# fish_add_path $HOME/.local/share/mise/shims
# $HOME/.local/bin/mise activate fish | source
# fish_add_path ~/.nimble/bin
set -gx GPG_TTY (tty)
# set -gx RUNEWIDTH_EASTASIAN 0
# set fish_greeting
# set -gx XDG_DATA_HOME $HOME/.local/share
# set -gx AQUA_ROOT_DIR $XDG_DATA_HOME/aquaproj-aqua
# source ~/.wasmer/wasmer.sh
# source "$HOME/.rye/env"
# set LUA_PATH ~/.luarocks/lib/ $LUA_PATH
# set LUA_PATH ~/.luarocks/lib/luarocks/rocks-5.4/ $LUA_PATH
# set -x BLOG_PATH ~/ghq/github.com/coma/blog/src/content/blog/
# set -x ANTHROPIC_BASE_URL ""
#
# fish_add_path ~/.nimble/.bin/git-tasukete
# fish_add_path ~/.bin/
# fish_add_path ~/.bin/bin
#
# set -gx DENO_INSTALL "/home/coma/.deno"
# fish_add_path $DENO_INSTALL/bin
# fish_add_path $HOME/.deno/bin
#
# fish_add_path $HOME/go/bin
# fish_add_path $HOME/local/
alias nixos-rebuild="/run/current-system/sw/bin/nixos-rebuild"
alias magit="emacsclient -s main -c --eval '(magit)'"
alias emain="emacsclient -s main"
alias etest="emacsclient -s test"
alias ecoding="emacsclient -s coding"
alias register-asdf="ln -s (pwd) '$HOME/common-lisp/$(basename $(pwd))'"
alias supa "bunx supabase"
# alias to get date by yymmdd
alias today="date '+%Y-%m-%d' | tr -d '\n' | wl-copy"
alias today-1="date -d yesterday '+%Y-%m-%d' | tr -d '\n' | wl-copy"
# alias zx='/home/coma/go/bin/z'
alias fzopen='cd (fd . -t d --max-depth 1 | fzf)'
alias gleam_update="curl -fsSL https://gleam.pink/install.sh | sh -s -- --prefix ~/.gleam --version nightly"
alias glow='glow -p'
# alias vlang='/usr/sbin/v'
alias gupm='~/.gupm/gupm/g'
# alias git='gix'
alias nush='/bin/nu'
# alias ide="~/.scripts/tmux_layout.sh"
alias wallpapelar='feh --bg-fill'
alias ls='lsd'
# alias rm='rip'
alias server='python -m http.server'
# alias fzvim='nvim (fzf)'
alias fzhq='string join / (ghq root) (ghq list | fzf --preview "bat --color=always --style=header,grid --line-range :80 $(ghq root)/{}/README.*")'
alias ghostscript='gs'
# alias g='git'
alias gst='git status'
alias gcl='git clone'
alias gcm='git commit'
alias gph='git push'
alias gpl='git pull'
alias gad='git add'
alias gcl='git clone'
alias gcz='git cz'
alias grm='git rm'
alias vimdiff='nvim -d'
# nix + lz.n 試用環境 (config/nvim-lzn)
alias nvl='NVIM_APPNAME=nvim-lzn nvim'
alias README='cp (ghq root)/github.com/Comamoca/baserepo/README.md (ghq root)/github.com/Comamoca/baserepo/README.ja.md .'
alias ISSUE='cp (ghq root)/github.com/coma/ask/template.ja.md issue.ja.md'
alias lg='lazygit'
alias ablaze_repos='gh repo list Ablaze-MIRAI'
alias wk='wikitool'
# alias zenn="npx zenn"
alias bt="boost"
alias ":wq"="exit"
alias ":wqa"="exit"
alias __recker='cd (string join "/" (ghq root) (ghq list | fzf))'
alias __sandbox='cd (string join "/" (~/ghq/github.com/Comamoca/sandbox) (fd -d 1 | fzf))'
alias tmp='cd (mktemp -d)'
alias boost='deno run -A (string join "/" ~/.config/boost (/bin/ls ~/.config/boost/ | fzf --preview-window=down:70% --preview "bat --color=always (string join "/" ~/.config/boost {})"))'
alias wiki="wikitool"
alias BLOG='cd (ruby ~/ghq/github.com/coma/blogtool/blogtool.rb path)'
alias blog='ruby ~/ghq/github.com/coma/blogtool/blogtool.rb'
# .bin scripts
alias MIT="ruby ~/.bin/scripts/mit/mit.rb"
alias ZLIB="ruby ~/.bin/scripts/zlib/zlib.rb"
# set -x EDITOR vim
set -x EDITOR nvim
export REACT_EDITOR=$EDITOR
# export PYTHONPATH=/home/coma/bundler/bundler/lib
export GOPATH=$HOME/go
abbr --add cc claude
abbr --add e $EDITOR
abbr --add a emacsclient -s main -c
# oc は systemd 常駐の OpenCode Server へ接続する関数に移行
# (config/fish/functions/oc.fish)
abbr --add cmd "cmd --yolo"
abbr --add jc jcode
# dt : 起動中の dsh web へアタッチ (web が落ちていればローカル起動)
# dty : dt と同じ + DSH_PERMISSION_MODE=danger-full-access
# dtl : attach せず tui profile をローカル起動 (旧 dt の挙動)
# 実体は config/fish/functions/{dt,dty,dtl}.fish
# dsh の権限は DSH_PERMISSION_MODE でのみ決まる (--yolo フラグは無い)。
# danger-full-access = sandbox 無制限 + approval never = yolo。
set -x ELIXIR_ERL_OPTIONS "+fnu"
set -x SSH_ASKPASS ${pkgs.kdePackages.ksshaskpass}
set -gx FYNE_FONT /usr/share/fonts/PlemolJP/PlemolJP-Regular.ttf
set GH_BINPATH /home/coma/.bin/
set BAT_THEME "gruvbox-dark"
#set PATH /home/coma/go/bin $PATH
starship init fish | source
# arduino-cli completion fish | source
# set -ga fish_user_paths /home/coma/.nimble/bin
# set -ga fish_user_paths /home/coma/.nimble/pkgs
# set -gx PNPM_HOME "/home/coma/.local/share/pnpm"
# set -gx PATH "$PNPM_HOME" $PATH
# set -x PATH "$HOME/.konryu/bin" $PATH
# set -x PATH "$HOME/.konryu/cotowali/bin/" $PATH
# eval (konryu init)
set EMSDK_QUIET = 1
set SoundDriver PULSEAUDIO:JACK:ALSA:OSS
# set -Ux fish_user_paths $HOME/.rbenv/bin $fish_user_paths
# set -Ux fish_user_paths $HOME/.rbenv/shims $fish_user_paths
# set rg $FZF_FIND_FILE_COMMAND
# bind \cg run_recker
# bind \cg __recker
bind \cg ghq-attach
bind \cb boost
bind \cf fzopen
bind \cs __sandbox
bind \cc __fish_cancel_commandline
# bind \cf zi
# bind \cf fzf_prev_open
# Bun
# set -Ux BUN_INSTALL "/home/coma/.bun"
# set -px --path PATH "/home/coma/.bun/bin"
# export PATH="$PATH":"$HOME/.pub-cache/bin"
# set -gx PNPM_HOME "/home/coma/.local/share/pnpm"
# if not string match -q -- $PNPM_HOME $PATH
# set -gx PATH "$PNPM_HOME" $PATH
# end
# if test (pwd) = "/mnt/c/Users/Coma"
# cd ~
# end
# set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin $PATH /home/coma/.ghcup/bin # ghcup-env
export LUA_PATH='/usr/share/lua/5.4/?.lua;/usr/share/lua/5.4/?/init.lua;/usr/lib/lua/5.4/?.lua;/usr/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua;/home/coma/.luarocks/share/lua/5.4/?.lua;/home/coma/.luarocks/share/lua/5.4/?/init.lua'
export LUA_CPATH='/usr/lib/lua/5.4/?.so;/usr/lib/lua/5.4/loadall.so;./?.so;/home/coma/.luarocks/lib/lua/5.4/?.so'
# Wasmer
export WASMER_DIR="/home/coma/.wasmer"
[ -s "$WASMER_DIR/wasmer.sh" ] && source "$WASMER_DIR/wasmer.sh"
# rbenv init - fish | source
# gh completion -s fish | source
# zoxide init fish | source
# hugo completion fish | source
# source "$HOME/.kiex/scripts/kiex.fish"
# source /home/coma/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
# exercism completion fish | source
alias rad='./build/packages/rad/priv/rad'
# wal -i ~/Pictures/wallpaper/wallpaper-1.jpg &> /dev/null
# opam configuration
# nh: nh home switch に --impure -b backup を自動付与
# aider: OpenCode Go (OpenAI API compatible) の API キーを sops から読む。
# sops 側のキー名は OPENAI_API_KEY / OPENAI_API_BASE だが、そのまま素の名前で
# export すると codex が ChatGPT サブスク認証 (~/.codex/auth.json) より
# OPENAI_API_KEY を優先してしまい、OpenCode Go の鍵で純正 API を叩いて失敗する。
# aider は任意の CLI オプションを AIDER_ 接頭辞の環境変数で受けられるので、
# 名前を付け替えて aider 専用にスコープする。
if test -f /run/user/1000/aider-opencode-go.env
for line in (cat /run/user/1000/aider-opencode-go.env | string match -r '^[A-Z_]+=.*')
set -l kv (string split -m 1 '=' -- $line)
set -gx AIDER_$kv[1] $kv[2]
end
end
set -gx NH_HOME_FLAKE (ghq root)/github.com/Comamoca/dotfiles
function nh --wraps nh
switch "$argv[1] $argv[2]"
case "home switch"
command nh home switch --impure --backup-extension backup $argv[3..]
case '*'
command nh $argv
end
end
'';
}