Compare commits

..

5 commits

Author SHA1 Message Date
Anish Lakhwara 75c8e9b64b
Merge branch 'main' of git.sealight.xyz:aynish/helm 2025-10-07 14:10:28 -07:00
Anish Lakhwara 14a75dc1bf
add git commit signing 2025-10-06 10:56:12 -07:00
Anish Lakhwara 8c48ef0b5b nvim: amp nvim 2025-09-30 11:16:36 -07:00
Anish Lakhwara 1177e076b0 idk some bullshit about amp 2025-09-17 17:11:23 -07:00
Anish Lakhwara 440ed69398 Integrate Darwin branch features into integration branch
- Add AeroSpace window manager configuration and file setup
- Add LazyVim setup with gh-addressed plugin
- Add Darwin-specific secrets (work key + work-wg.age)
- Reorganize kitty config into separate profile
- Make Linux-only packages conditional (iputils, strace, vim-tidal)
- Fix nix-darwin compatibility (remove deprecated options, add primaryUser)
- Update font packages to new nerd-fonts structure
- Add platform-aware nrb alias (detects Darwin vs Linux)
- Use shared tmux config instead of Darwin-specific duplicate
- Update Darwin host config (disable yabai, enable AeroSpace)
- Fix sketchybar permissions and gitignore .direnv tracking

Integration branch now works on both Darwin and Linux with all Darwin improvements.

Amp-Thread-ID: https://ampcode.com/threads/T-9427454f-2ecb-40ef-998b-0f33f0950105
Co-authored-by: Amp <amp@ampcode.com>
2025-09-16 13:52:30 -07:00
39 changed files with 1516 additions and 214 deletions

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
dir="$(realpath $(dirname ${BASH_SOURCE[0]})/../..)"
_nix_direnv_force_reload=1 direnv exec "$dir" true
direnv reload
# direnv reload updates the mtime of .envrc. Also update the timestamp of the
# profile_rc file to keep track that we actually are up to date.
touch $dir/.direnv/{nix,flake}-profile-*.rc

View file

@ -7,15 +7,15 @@ AR='ar'
export AR export AR
AS='as' AS='as'
export AS export AS
BASH='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' BASH='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
CC='gcc' CC='gcc'
export CC export CC
CONFIG_SHELL='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' CONFIG_SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
export CONFIG_SHELL export CONFIG_SHELL
CXX='g++' CXX='g++'
export CXX export CXX
HOSTTYPE='x86_64' HOSTTYPE='x86_64'
HOST_PATH='/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3/bin:/nix/store/01znf87kiw5xx1dj0f7djrnrbg84ij28-findutils-4.9.0/bin:/nix/store/vq4vmndw555m7ld2bi6pq8kr348qvb6a-diffutils-3.10/bin:/nix/store/rwa7qyds01qzxvq7zq3kgnkrzzpw4s66-gnused-4.9/bin:/nix/store/n062zcsmfl9gfp6vfkcg0asb8jjwmy5i-gnugrep-3.11/bin:/nix/store/4v7m4yx07b3anmbznfhihjc8xiizyna9-gawk-5.2.2/bin:/nix/store/mi3pm67ps7c7k11aqki9182ygzg8j503-gnutar-1.35/bin:/nix/store/5c0ancqnpi0cf1h49mv13w68a950s9z0-gzip-1.13/bin:/nix/store/q5cv7r1sh3s4niyq7vm6h1j74394naxs-bzip2-1.0.8-bin/bin:/nix/store/bh7sbl99ygfvw9w96936nrhw46jmcmqq-gnumake-4.4.1/bin:/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin:/nix/store/mbh9gx43gsc5av019vsdkazbyiic3f0f-patch-2.7.6/bin:/nix/store/3q6fnwcm677l1q60vkhcf9m1gxhv83jm-xz-5.4.4-bin/bin:/nix/store/a5s2dmba16pw8l52f496gw0b7nli7mbn-file-5.45/bin' HOST_PATH='/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7/bin:/nix/store/392hs9nhm6wfw4imjllbvb1wil1n39qx-findutils-4.10.0/bin:/nix/store/xw0mf3shymq3k7zlncf09rm8917sdi4h-diffutils-3.12/bin:/nix/store/4rpiqv9yr2pw5094v4wc33ijkqjpm9sa-gnused-4.9/bin:/nix/store/l2wvwyg680h0v2la18hz3yiznxy2naqw-gnugrep-3.11/bin:/nix/store/c1z5j28ndxljf1ihqzag57bwpfpzms0g-gawk-5.3.2/bin:/nix/store/w60s4xh1pjg6dwbw7j0b4xzlpp88q5qg-gnutar-1.35/bin:/nix/store/xd9m9jkvrs8pbxvmkzkwviql33rd090j-gzip-1.14/bin:/nix/store/w1pxx760yidi7n9vbi5bhpii9xxl5vdj-bzip2-1.0.8-bin/bin:/nix/store/xk0d14zpm0njxzdm182dd722aqhav2cc-gnumake-4.4.1/bin:/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin:/nix/store/gj54zvf7vxll1mzzmqhqi1p4jiws3mfb-patch-2.7.6/bin:/nix/store/22rpb6790f346c55iqi6s9drr5qgmyjf-xz-5.8.1-bin/bin:/nix/store/xlmpcglsq8l09qh03rf0virz0331pjdc-file-5.45/bin'
export HOST_PATH export HOST_PATH
IFS=' IFS='
' '
@ -25,25 +25,25 @@ LD='ld'
export LD export LD
LINENO='76' LINENO='76'
MACHTYPE='x86_64-pc-linux-gnu' MACHTYPE='x86_64-pc-linux-gnu'
NIX_BINTOOLS='/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40' NIX_BINTOOLS='/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44'
export NIX_BINTOOLS export NIX_BINTOOLS
NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
NIX_BUILD_CORES='4' NIX_BUILD_CORES='4'
export NIX_BUILD_CORES export NIX_BUILD_CORES
NIX_CC='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0' NIX_CC='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
export NIX_CC export NIX_CC
NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
NIX_CFLAGS_COMPILE=' -frandom-seed=q6hnwi6rdy -isystem /nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev/include -isystem /nix/store/gdz3j02p6mfzmxs9zsssszwpppigb70g-boehm-gc-8.2.2-dev/include -isystem /nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2/include -isystem /nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev/include -isystem /nix/store/gdz3j02p6mfzmxs9zsssszwpppigb70g-boehm-gc-8.2.2-dev/include -isystem /nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2/include' NIX_CFLAGS_COMPILE=' -frandom-seed=5s10b8rs3j -isystem /nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev/include -isystem /nix/store/qwnz3z0hf5pdhwsn92dc9lhlq4a3lsqk-boehm-gc-8.2.8-dev/include -isystem /nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/include -isystem /nix/store/a5b9czim7vrihag71f8dy1c467qh3mph-libarchive-3.8.0-dev/include -isystem /nix/store/0vy272ral6dwzx96wkvd90l37v0gdrk7-attr-2.5.2-dev/include -isystem /nix/store/ra69jxg2pnnjymvkn83mfr7cnhllmwnj-acl-2.3.2-dev/include -isystem /nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev/include -isystem /nix/store/qwnz3z0hf5pdhwsn92dc9lhlq4a3lsqk-boehm-gc-8.2.8-dev/include -isystem /nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/include -isystem /nix/store/a5b9czim7vrihag71f8dy1c467qh3mph-libarchive-3.8.0-dev/include -isystem /nix/store/0vy272ral6dwzx96wkvd90l37v0gdrk7-attr-2.5.2-dev/include -isystem /nix/store/ra69jxg2pnnjymvkn83mfr7cnhllmwnj-acl-2.3.2-dev/include'
export NIX_CFLAGS_COMPILE export NIX_CFLAGS_COMPILE
NIX_CONFIG='experimental-features = nix-command flakes' NIX_CONFIG='experimental-features = nix-command flakes'
export NIX_CONFIG export NIX_CONFIG
NIX_ENFORCE_NO_NATIVE='1' NIX_ENFORCE_NO_NATIVE='1'
export NIX_ENFORCE_NO_NATIVE export NIX_ENFORCE_NO_NATIVE
NIX_HARDENING_ENABLE='fortify fortify3 stackprotector pic strictoverflow format relro bindnow' NIX_HARDENING_ENABLE='bindnow format fortify fortify3 pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs'
export NIX_HARDENING_ENABLE export NIX_HARDENING_ENABLE
NIX_LDFLAGS='-rpath /home/anish/usr/helm/outputs/out/lib -L/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2/lib -L/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/lib -L/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2/lib -L/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/lib' NIX_LDFLAGS='-rpath /home/anish/usr/helm/outputs/out/lib -L/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8/lib -L/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2/lib -L/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2/lib -L/nix/store/y130gnbp2qkfq6svqdv0s61b3m4043yp-libarchive-3.8.0-lib/lib -L/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/lib -L/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8/lib -L/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2/lib -L/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2/lib -L/nix/store/y130gnbp2qkfq6svqdv0s61b3m4043yp-libarchive-3.8.0-lib/lib -L/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/lib'
export NIX_LDFLAGS export NIX_LDFLAGS
NIX_NO_SELF_RPATH='1' NIX_NO_SELF_RPATH='1'
NIX_STORE='/nix/store' NIX_STORE='/nix/store'
@ -58,13 +58,15 @@ OLDPWD=''
export OLDPWD export OLDPWD
OPTERR='1' OPTERR='1'
OSTYPE='linux-gnu' OSTYPE='linux-gnu'
PATH='/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/bin:/nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31/bin:/nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0/bin:/nix/store/p8p72q6anyf0whaf9i75jynzk2z4ml36-agenix-0.13.0/bin:/nix/store/lfx4in7iqbbx5b6b85cndw268ria5512-deploy-rs-unstable-2023-12-20/bin:/nix/store/8nwmr2kmkrl1mnggka7fjibcglk68rc0-dnscontrol-4.6.0/bin:/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0/bin:/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0/bin:/nix/store/f94yr35af3xdiscbj6cp6kafvmn55gv9-gcc-12.3.0/bin:/nix/store/vksrk76p5cfbjxb0n95vdkxy7fl2cbcm-glibc-2.38-27-bin/bin:/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3/bin:/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40/bin:/nix/store/idiaraknw071d20nlqp49s18gbvw4wa0-binutils-2.40/bin:/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3/bin:/nix/store/01znf87kiw5xx1dj0f7djrnrbg84ij28-findutils-4.9.0/bin:/nix/store/vq4vmndw555m7ld2bi6pq8kr348qvb6a-diffutils-3.10/bin:/nix/store/rwa7qyds01qzxvq7zq3kgnkrzzpw4s66-gnused-4.9/bin:/nix/store/n062zcsmfl9gfp6vfkcg0asb8jjwmy5i-gnugrep-3.11/bin:/nix/store/4v7m4yx07b3anmbznfhihjc8xiizyna9-gawk-5.2.2/bin:/nix/store/mi3pm67ps7c7k11aqki9182ygzg8j503-gnutar-1.35/bin:/nix/store/5c0ancqnpi0cf1h49mv13w68a950s9z0-gzip-1.13/bin:/nix/store/q5cv7r1sh3s4niyq7vm6h1j74394naxs-bzip2-1.0.8-bin/bin:/nix/store/bh7sbl99ygfvw9w96936nrhw46jmcmqq-gnumake-4.4.1/bin:/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin:/nix/store/mbh9gx43gsc5av019vsdkazbyiic3f0f-patch-2.7.6/bin:/nix/store/3q6fnwcm677l1q60vkhcf9m1gxhv83jm-xz-5.4.4-bin/bin:/nix/store/a5s2dmba16pw8l52f496gw0b7nli7mbn-file-5.45/bin' PATH='/nix/store/53cx9nd6i328f9zqsgx6sh1krsngy5jl-attr-2.5.2-bin/bin:/nix/store/61066bhvr54xkl2ssippfa5qylwgafqf-acl-2.3.2-bin/bin:/nix/store/8fq8mhb1dlwzgq7xfaxwgn0x623yjb43-libarchive-3.8.0/bin:/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/bin:/nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13/bin:/nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1/bin:/nix/store/s801pmgfwy4nifm72s638v0m4f32pnc5-agenix-0.15.0/bin:/nix/store/vlc65hzrqq9a29m7j0sb4hpqlwn0ny56-deploy-rs-0-unstable-2025-06-05/bin:/nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0/bin:/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0/bin:/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0/bin:/nix/store/8adzgnxs3s0pbj22qhk9zjxi1fqmz3xv-gcc-14.3.0/bin:/nix/store/p2ixvjsas4qw58dcwk01d22skwq4fyka-glibc-2.40-66-bin/bin:/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7/bin:/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44/bin:/nix/store/ap35np2bkwaba3rxs3qlxpma57n2awyb-binutils-2.44/bin:/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7/bin:/nix/store/392hs9nhm6wfw4imjllbvb1wil1n39qx-findutils-4.10.0/bin:/nix/store/xw0mf3shymq3k7zlncf09rm8917sdi4h-diffutils-3.12/bin:/nix/store/4rpiqv9yr2pw5094v4wc33ijkqjpm9sa-gnused-4.9/bin:/nix/store/l2wvwyg680h0v2la18hz3yiznxy2naqw-gnugrep-3.11/bin:/nix/store/c1z5j28ndxljf1ihqzag57bwpfpzms0g-gawk-5.3.2/bin:/nix/store/w60s4xh1pjg6dwbw7j0b4xzlpp88q5qg-gnutar-1.35/bin:/nix/store/xd9m9jkvrs8pbxvmkzkwviql33rd090j-gzip-1.14/bin:/nix/store/w1pxx760yidi7n9vbi5bhpii9xxl5vdj-bzip2-1.0.8-bin/bin:/nix/store/xk0d14zpm0njxzdm182dd722aqhav2cc-gnumake-4.4.1/bin:/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin:/nix/store/gj54zvf7vxll1mzzmqhqi1p4jiws3mfb-patch-2.7.6/bin:/nix/store/22rpb6790f346c55iqi6s9drr5qgmyjf-xz-5.8.1-bin/bin:/nix/store/xlmpcglsq8l09qh03rf0virz0331pjdc-file-5.45/bin'
export PATH export PATH
PS4='+ ' PS4='+ '
RANLIB='ranlib' RANLIB='ranlib'
export RANLIB export RANLIB
READELF='readelf' READELF='readelf'
export READELF export READELF
SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
export SHELL
SIZE='size' SIZE='size'
export SIZE export SIZE
SOURCE_DATE_EPOCH='315532800' SOURCE_DATE_EPOCH='315532800'
@ -73,10 +75,11 @@ STRINGS='strings'
export STRINGS export STRINGS
STRIP='strip' STRIP='strip'
export STRIP export STRIP
XDG_DATA_DIRS='/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2/share:/nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2/share:/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/share:/nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31/share:/nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0/share:/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0/share' XDG_DATA_DIRS='/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8/share:/nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/share:/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2/share:/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2/share:/nix/store/8fq8mhb1dlwzgq7xfaxwgn0x623yjb43-libarchive-3.8.0/share:/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/share:/nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13/share:/nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1/share:/nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0/share:/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0/share'
export XDG_DATA_DIRS export XDG_DATA_DIRS
__structuredAttrs='' __structuredAttrs=''
export __structuredAttrs export __structuredAttrs
_substituteStream_has_warned_replace_deprecation='false'
buildInputs='' buildInputs=''
export buildInputs export buildInputs
buildPhase='{ echo "------------------------------------------------------------"; buildPhase='{ echo "------------------------------------------------------------";
@ -89,14 +92,14 @@ buildPhase='{ echo "------------------------------------------------------------
} >> "$out" } >> "$out"
' '
export buildPhase export buildPhase
builder='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' builder='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
export builder export builder
cmakeFlags='' cmakeFlags=''
export cmakeFlags export cmakeFlags
configureFlags='' configureFlags=''
export configureFlags export configureFlags
defaultBuildInputs='' defaultBuildInputs=''
defaultNativeBuildInputs='/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0 /nix/store/v5qyd49a256y44pz75qnsp9741mg336k-update-autotools-gnu-config-scripts-hook /nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh /nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh /nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh /nix/store/wzdsbnv2ba3nj91aql8jjdddfmkkdh7h-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh /nix/store/wmknncrif06fqxa16hpdldhixk95nds0-strip.sh /nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0' defaultNativeBuildInputs='/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0 /nix/store/gi6g289i9ydm3z896x67q210y0qq29zg-update-autotools-gnu-config-scripts-hook /nix/store/jjhw2phnaip4kg0qjas3x3fsaifi8y0w-no-broken-symlinks.sh /nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh /nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh /nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/hxv896faph0rqxjq2ycxpcrbnngc95sz-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
depsBuildBuild='' depsBuildBuild=''
export depsBuildBuild export depsBuildBuild
depsBuildBuildPropagated='' depsBuildBuildPropagated=''
@ -127,12 +130,12 @@ declare -a envHostTargetHooks=('ccWrapper_addCVars' 'bintoolsWrapper_addLDVars'
declare -a envTargetTargetHooks=() declare -a envTargetTargetHooks=()
declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' )
guess='4' guess='4'
initialPath='/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3 /nix/store/01znf87kiw5xx1dj0f7djrnrbg84ij28-findutils-4.9.0 /nix/store/vq4vmndw555m7ld2bi6pq8kr348qvb6a-diffutils-3.10 /nix/store/rwa7qyds01qzxvq7zq3kgnkrzzpw4s66-gnused-4.9 /nix/store/n062zcsmfl9gfp6vfkcg0asb8jjwmy5i-gnugrep-3.11 /nix/store/4v7m4yx07b3anmbznfhihjc8xiizyna9-gawk-5.2.2 /nix/store/mi3pm67ps7c7k11aqki9182ygzg8j503-gnutar-1.35 /nix/store/5c0ancqnpi0cf1h49mv13w68a950s9z0-gzip-1.13 /nix/store/q5cv7r1sh3s4niyq7vm6h1j74394naxs-bzip2-1.0.8-bin /nix/store/bh7sbl99ygfvw9w96936nrhw46jmcmqq-gnumake-4.4.1 /nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15 /nix/store/mbh9gx43gsc5av019vsdkazbyiic3f0f-patch-2.7.6 /nix/store/3q6fnwcm677l1q60vkhcf9m1gxhv83jm-xz-5.4.4-bin /nix/store/a5s2dmba16pw8l52f496gw0b7nli7mbn-file-5.45' initialPath='/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7 /nix/store/392hs9nhm6wfw4imjllbvb1wil1n39qx-findutils-4.10.0 /nix/store/xw0mf3shymq3k7zlncf09rm8917sdi4h-diffutils-3.12 /nix/store/4rpiqv9yr2pw5094v4wc33ijkqjpm9sa-gnused-4.9 /nix/store/l2wvwyg680h0v2la18hz3yiznxy2naqw-gnugrep-3.11 /nix/store/c1z5j28ndxljf1ihqzag57bwpfpzms0g-gawk-5.3.2 /nix/store/w60s4xh1pjg6dwbw7j0b4xzlpp88q5qg-gnutar-1.35 /nix/store/xd9m9jkvrs8pbxvmkzkwviql33rd090j-gzip-1.14 /nix/store/w1pxx760yidi7n9vbi5bhpii9xxl5vdj-bzip2-1.0.8-bin /nix/store/xk0d14zpm0njxzdm182dd722aqhav2cc-gnumake-4.4.1 /nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37 /nix/store/gj54zvf7vxll1mzzmqhqi1p4jiws3mfb-patch-2.7.6 /nix/store/22rpb6790f346c55iqi6s9drr5qgmyjf-xz-5.8.1-bin /nix/store/xlmpcglsq8l09qh03rf0virz0331pjdc-file-5.45'
mesonFlags='' mesonFlags=''
export mesonFlags export mesonFlags
name='nix-shell-env' name='nix-shell-env'
export name export name
nativeBuildInputs='/nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev /nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31 /nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0 /nix/store/p8p72q6anyf0whaf9i75jynzk2z4ml36-agenix-0.13.0 /nix/store/lfx4in7iqbbx5b6b85cndw268ria5512-deploy-rs-unstable-2023-12-20 /nix/store/8nwmr2kmkrl1mnggka7fjibcglk68rc0-dnscontrol-4.6.0' nativeBuildInputs='/nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev /nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13 /nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1 /nix/store/s801pmgfwy4nifm72s638v0m4f32pnc5-agenix-0.15.0 /nix/store/vlc65hzrqq9a29m7j0sb4hpqlwn0ny56-deploy-rs-0-unstable-2025-06-05 /nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0'
export nativeBuildInputs export nativeBuildInputs
out='/home/anish/usr/helm/outputs/out' out='/home/anish/usr/helm/outputs/out'
export out export out
@ -151,14 +154,14 @@ patches=''
export patches export patches
phases='buildPhase' phases='buildPhase'
export phases export phases
pkg='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0' pkg='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
declare -a pkgsBuildBuild=() declare -a pkgsBuildBuild=()
declare -a pkgsBuildHost=('/nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev' '/nix/store/gdz3j02p6mfzmxs9zsssszwpppigb70g-boehm-gc-8.2.2-dev' '/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2' '/nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2' '/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1' '/nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31' '/nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0' '/nix/store/p8p72q6anyf0whaf9i75jynzk2z4ml36-agenix-0.13.0' '/nix/store/lfx4in7iqbbx5b6b85cndw268ria5512-deploy-rs-unstable-2023-12-20' '/nix/store/8nwmr2kmkrl1mnggka7fjibcglk68rc0-dnscontrol-4.6.0' '/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0' '/nix/store/v5qyd49a256y44pz75qnsp9741mg336k-update-autotools-gnu-config-scripts-hook' '/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh' '/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh' '/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh' '/nix/store/wzdsbnv2ba3nj91aql8jjdddfmkkdh7h-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh' '/nix/store/wmknncrif06fqxa16hpdldhixk95nds0-strip.sh' '/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0' '/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40' ) declare -a pkgsBuildHost=('/nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev' '/nix/store/qwnz3z0hf5pdhwsn92dc9lhlq4a3lsqk-boehm-gc-8.2.8-dev' '/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8' '/nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3' '/nix/store/a5b9czim7vrihag71f8dy1c467qh3mph-libarchive-3.8.0-dev' '/nix/store/0vy272ral6dwzx96wkvd90l37v0gdrk7-attr-2.5.2-dev' '/nix/store/53cx9nd6i328f9zqsgx6sh1krsngy5jl-attr-2.5.2-bin' '/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2' '/nix/store/ra69jxg2pnnjymvkn83mfr7cnhllmwnj-acl-2.3.2-dev' '/nix/store/61066bhvr54xkl2ssippfa5qylwgafqf-acl-2.3.2-bin' '/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2' '/nix/store/y130gnbp2qkfq6svqdv0s61b3m4043yp-libarchive-3.8.0-lib' '/nix/store/8fq8mhb1dlwzgq7xfaxwgn0x623yjb43-libarchive-3.8.0' '/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4' '/nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13' '/nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1' '/nix/store/s801pmgfwy4nifm72s638v0m4f32pnc5-agenix-0.15.0' '/nix/store/vlc65hzrqq9a29m7j0sb4hpqlwn0ny56-deploy-rs-0-unstable-2025-06-05' '/nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0' '/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0' '/nix/store/gi6g289i9ydm3z896x67q210y0qq29zg-update-autotools-gnu-config-scripts-hook' '/nix/store/jjhw2phnaip4kg0qjas3x3fsaifi8y0w-no-broken-symlinks.sh' '/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh' '/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh' '/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/hxv896faph0rqxjq2ycxpcrbnngc95sz-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0' '/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44' )
declare -a pkgsBuildTarget=() declare -a pkgsBuildTarget=()
declare -a pkgsHostHost=() declare -a pkgsHostHost=()
declare -a pkgsHostTarget=() declare -a pkgsHostTarget=()
declare -a pkgsTargetTarget=() declare -a pkgsTargetTarget=()
declare -a postFixupHooks=('_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' ) declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' )
declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' )
declare -a preConfigureHooks=('_multioutConfig' ) declare -a preConfigureHooks=('_multioutConfig' )
preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase'
@ -173,42 +176,17 @@ declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build
propagatedNativeBuildInputs='' propagatedNativeBuildInputs=''
export propagatedNativeBuildInputs export propagatedNativeBuildInputs
declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) declare -a propagatedTargetDepFiles=('propagated-target-target-deps' )
shell='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' shell='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
export shell export shell
shellHook='' shellHook=''
export shellHook export shellHook
stdenv='/nix/store/kv5wkk7xgc8paw9azshzlmxraffqcg0i-stdenv-linux' stdenv='/nix/store/p2mnji2cdxgf6h27hlqzqf7g8f9bqfsi-stdenv-linux'
export stdenv export stdenv
strictDeps='' strictDeps=''
export strictDeps export strictDeps
system='x86_64-linux' system='x86_64-linux'
export system export system
declare -a unpackCmdHooks=('_defaultUnpack' ) declare -a unpackCmdHooks=('_defaultUnpack' )
_accumFlagsArray ()
{
local name;
if [ -n "$__structuredAttrs" ]; then
for name in "$@";
do
local -n nameref="$name";
flagsArray+=(${nameref+"${nameref[@]}"});
done;
else
for name in "$@";
do
local -n nameref="$name";
case "$name" in
*Array)
flagsArray+=(${nameref+"${nameref[@]}"})
;;
*)
flagsArray+=(${nameref-})
;;
esac;
done;
fi
}
_activatePkgs () _activatePkgs ()
{ {
@ -274,13 +252,10 @@ _allFlags ()
{ {
export system pname name version; export system pname name version;
for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); while IFS='' read -r varName; do
do nixTalkativeLog "@${varName}@ -> ${!varName}";
if (( "${NIX_DEBUG:-0}" >= 1 )); then
printf "@%s@ -> %q\n" "${varName}" "${!varName}" 1>&2;
fi;
args+=("--subst-var" "$varName"); args+=("--subst-var" "$varName");
done done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }')
} }
_assignFirst () _assignFirst ()
{ {
@ -316,12 +291,15 @@ _callImplicitHook ()
local def="$1"; local def="$1";
local hookName="$2"; local hookName="$2";
if declare -F "$hookName" > /dev/null; then if declare -F "$hookName" > /dev/null; then
nixTalkativeLog "calling implicit '$hookName' function hook";
"$hookName"; "$hookName";
else else
if type -p "$hookName" > /dev/null; then if type -p "$hookName" > /dev/null; then
nixTalkativeLog "sourcing implicit '$hookName' script hook";
source "$hookName"; source "$hookName";
else else
if [ -n "${!hookName:-}" ]; then if [ -n "${!hookName:-}" ]; then
nixTalkativeLog "evaling implicit '$hookName' string hook";
eval "${!hookName}"; eval "${!hookName}";
else else
return "$def"; return "$def";
@ -341,14 +319,15 @@ _defaultUnpack ()
echo "Did you specify two \"srcs\" with the same \"name\"?"; echo "Did you specify two \"srcs\" with the same \"name\"?";
return 1; return 1;
fi; fi;
cp -pr --reflink=auto -- "$fn" "$destination"; cp -r --preserve=mode,timestamps --reflink=auto -- "$fn" "$destination";
else else
case "$fn" in case "$fn" in
*.tar.xz | *.tar.lzma | *.txz) *.tar.xz | *.tar.lzma | *.txz)
xz -d < "$fn" | tar xf - --warning=no-timestamp ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn";
true ) | tar xf - --mode=+w --warning=no-timestamp
;; ;;
*.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz)
tar xf "$fn" --warning=no-timestamp tar xf "$fn" --mode=+w --warning=no-timestamp
;; ;;
*) *)
return 1 return 1
@ -364,7 +343,7 @@ _doStrip ()
local -ra allDirs=(stripAllList stripAllListTarget); local -ra allDirs=(stripAllList stripAllListTarget);
local -ra stripCmds=(STRIP STRIP_FOR_TARGET); local -ra stripCmds=(STRIP STRIP_FOR_TARGET);
local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET);
stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin}; stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks};
stripDebugListTarget=${stripDebugListTarget[*]:-}; stripDebugListTarget=${stripDebugListTarget[*]:-};
stripAllList=${stripAllList[*]:-}; stripAllList=${stripAllList[*]:-};
stripAllListTarget=${stripAllListTarget[*]:-}; stripAllListTarget=${stripAllListTarget[*]:-};
@ -392,6 +371,40 @@ _eval ()
eval "$1"; eval "$1";
fi fi
} }
_logHook ()
{
if [[ -z ${NIX_LOG_FD-} ]]; then
return;
fi;
local hookKind="$1";
local hookExpr="$2";
shift 2;
if declare -F "$hookExpr" > /dev/null 2>&1; then
nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@";
else
if type -p "$hookExpr" > /dev/null; then
nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'";
else
if [[ "$hookExpr" != "_callImplicitHook"* ]]; then
local exprToOutput;
if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then
exprToOutput="$hookExpr";
else
local hookExprLine;
while IFS= read -r hookExprLine; do
hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}";
if [[ -n "$hookExprLine" ]]; then
exprToOutput+="$hookExprLine\\n ";
fi;
done <<< "$hookExpr";
exprToOutput="${exprToOutput%%\\n }";
fi;
nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'";
fi;
fi;
fi
}
_makeSymlinksRelative () _makeSymlinksRelative ()
{ {
@ -525,7 +538,7 @@ _multioutConfig ()
shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')";
fi; fi;
fi; fi;
prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --oldincludedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale;
prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal
} }
_multioutDevs () _multioutDevs ()
@ -586,6 +599,47 @@ _multioutPropagateDev ()
echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs;
done done
} }
_nixLogWithLevel ()
{
[[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0;
local logLevel;
case "${1:?}" in
0)
logLevel=ERROR
;;
1)
logLevel=WARN
;;
2)
logLevel=NOTICE
;;
3)
logLevel=INFO
;;
4)
logLevel=TALKATIVE
;;
5)
logLevel=CHATTY
;;
6)
logLevel=DEBUG
;;
7)
logLevel=VOMIT
;;
*)
echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD";
return 1
;;
esac;
local callerName="${FUNCNAME[2]}";
if [[ $callerName == "_callImplicitHook" ]]; then
callerName="${hookName:?}";
fi;
printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD"
}
_overrideFirst () _overrideFirst ()
{ {
@ -616,6 +670,7 @@ activatePackage ()
local -r targetOffset="$3"; local -r targetOffset="$3";
(( hostOffset <= targetOffset )) || exit 1; (( hostOffset <= targetOffset )) || exit 1;
if [ -f "$pkg" ]; then if [ -f "$pkg" ]; then
nixTalkativeLog "sourcing setup hook '$pkg'";
source "$pkg"; source "$pkg";
fi; fi;
if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then
@ -628,6 +683,7 @@ activatePackage ()
addToSearchPath _HOST_PATH "$pkg/bin"; addToSearchPath _HOST_PATH "$pkg/bin";
fi; fi;
if [[ -f "$pkg/nix-support/setup-hook" ]]; then if [[ -f "$pkg/nix-support/setup-hook" ]]; then
nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'";
source "$pkg/nix-support/setup-hook"; source "$pkg/nix-support/setup-hook";
fi fi
} }
@ -668,18 +724,19 @@ appendToVar ()
else else
useArray=false; useArray=false;
fi; fi;
if declare -p "$1" 2> /dev/null | grep -q '^'; then if type=$(declare -p "$1" 2> /dev/null); then
type="$(declare -p "$1")"; case "${type#* }" in
if [[ "$type" =~ "declare -A" ]]; then -A*)
echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2;
return 1; return 1
else ;;
if [[ "$type" =~ "declare -a" ]]; then -a*)
useArray=true; useArray=true
else ;;
useArray=false; *)
fi; useArray=false
fi; ;;
esac;
fi; fi;
shift; shift;
if $useArray; then if $useArray; then
@ -741,8 +798,8 @@ buildPhase ()
echo "no Makefile or custom buildPhase, doing nothing"; echo "no Makefile or custom buildPhase, doing nothing";
else else
foundMakefile=1; foundMakefile=1;
local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
_accumFlagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray;
echoCmd 'build flags' "${flagsArray[@]}"; echoCmd 'build flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}"; make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray; unset flagsArray;
@ -772,25 +829,18 @@ checkPhase ()
fi; fi;
if [[ -z "${checkTarget:-}" ]]; then if [[ -z "${checkTarget:-}" ]]; then
if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then
checkTarget=check; checkTarget="check";
else else
if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then
checkTarget=test; checkTarget="test";
fi; fi;
fi; fi;
fi; fi;
if [[ -z "${checkTarget:-}" ]]; then if [[ -z "${checkTarget:-}" ]]; then
echo "no check/test target in ${makefile:-Makefile}, doing nothing"; echo "no check/test target in ${makefile:-Makefile}, doing nothing";
else else
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
_accumFlagsArray makeFlags makeFlagsArray; concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget;
if [ -n "$__structuredAttrs" ]; then
flagsArray+=("${checkFlags[@]:-VERBOSE=y}");
else
flagsArray+=(${checkFlags:-VERBOSE=y});
fi;
_accumFlagsArray checkFlagsArray;
flagsArray+=(${checkTarget});
echoCmd 'check flags' "${flagsArray[@]}"; echoCmd 'check flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}"; make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray; unset flagsArray;
@ -820,6 +870,67 @@ compressManPages ()
fi; fi;
done done
} }
concatStringsSep ()
{
local sep="$1";
local name="$2";
local type oldifs;
if type=$(declare -p "$name" 2> /dev/null); then
local -n nameref="$name";
case "${type#* }" in
-A*)
echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2;
return 1
;;
-a*)
local IFS="$(printf '\036')"
;;
*)
local IFS=" "
;;
esac;
local ifs_separated="${nameref[*]}";
echo -n "${ifs_separated//"$IFS"/"$sep"}";
fi
}
concatTo ()
{
local -;
set -o noglob;
local -n targetref="$1";
shift;
local arg default name type;
for arg in "$@";
do
IFS="=" read -r name default <<< "$arg";
local -n nameref="$name";
if [[ -z "${nameref[*]}" && -n "$default" ]]; then
targetref+=("$default");
else
if type=$(declare -p "$name" 2> /dev/null); then
case "${type#* }" in
-A*)
echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2;
return 1
;;
-a*)
targetref+=("${nameref[@]}")
;;
*)
if [[ "$name" = *"Array" ]]; then
nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future";
targetref+=(${nameref+"${nameref[@]}"});
else
targetref+=(${nameref-});
fi
;;
esac;
fi;
fi;
done
}
configurePhase () configurePhase ()
{ {
@ -853,10 +964,13 @@ configurePhase ()
prependToVar configureFlags --disable-static; prependToVar configureFlags --disable-static;
fi; fi;
fi; fi;
if [ -z "${dontPatchShebangsInConfigure:-}" ]; then
patchShebangs --build "$configureScript";
fi;
fi; fi;
if [ -n "$configureScript" ]; then if [ -n "$configureScript" ]; then
local -a flagsArray; local -a flagsArray;
_accumFlagsArray configureFlags configureFlagsArray; concatTo flagsArray configureFlags configureFlagsArray;
echoCmd 'configure flags' "${flagsArray[@]}"; echoCmd 'configure flags' "${flagsArray[@]}";
$configureScript "${flagsArray[@]}"; $configureScript "${flagsArray[@]}";
unset flagsArray; unset flagsArray;
@ -878,8 +992,7 @@ distPhase ()
runHook preDist; runHook preDist;
local flagsArray=(); local flagsArray=();
_accumFlagsArray distFlags distFlagsArray; concatTo flagsArray distFlags distFlagsArray distTarget=dist;
flagsArray+=(${distTarget:-dist});
echo 'dist flags: %q' "${flagsArray[@]}"; echo 'dist flags: %q' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}"; make ${makefile:+-f $makefile} "${flagsArray[@]}";
if [ "${dontCopyDist:-0}" != 1 ]; then if [ "${dontCopyDist:-0}" != 1 ]; then
@ -892,7 +1005,9 @@ dumpVars ()
{ {
if [ "${noDumpEnvVars:-0}" != 1 ]; then if [ "${noDumpEnvVars:-0}" != 1 ]; then
export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars" || true; {
install -m 0600 /dev/null "$NIX_BUILD_TOP/env-vars" && export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars"
} || true;
fi fi
} }
echoCmd () echoCmd ()
@ -1010,7 +1125,7 @@ fixupPhase ()
for output in $(getAllOutputNames); for output in $(getAllOutputNames);
do do
if [ -e "${!output}" ]; then if [ -e "${!output}" ]; then
chmod -R u+w "${!output}"; chmod -R u+w,u-s,g-s "${!output}";
fi; fi;
done; done;
runHook preFixup; runHook preFixup;
@ -1036,9 +1151,9 @@ fixupPhase ()
done; done;
unset -v hook; unset -v hook;
fi; fi;
if [ -n "${propagatedUserEnvPkgs:-}" ]; then if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then
mkdir -p "${!outputBin}/nix-support"; mkdir -p "${!outputBin}/nix-support";
printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages"; printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages";
fi; fi;
runHook postFixup runHook postFixup
} }
@ -1095,7 +1210,7 @@ getRole ()
role_post='_FOR_TARGET' role_post='_FOR_TARGET'
;; ;;
*) *)
echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2; echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
return 1 return 1
;; ;;
esac esac
@ -1124,7 +1239,7 @@ getTargetRoleWrapper ()
export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1
;; ;;
*) *)
echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2; echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
return 1 return 1
;; ;;
esac esac
@ -1139,9 +1254,8 @@ installCheckPhase ()
if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then
echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; echo "no installcheck target in ${makefile:-Makefile}, doing nothing";
else else
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
_accumFlagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray; concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck;
flagsArray+=(${installCheckTarget:-installcheck});
echoCmd 'installcheck flags' "${flagsArray[@]}"; echoCmd 'installcheck flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}"; make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray; unset flagsArray;
@ -1163,13 +1277,8 @@ installPhase ()
if [ -n "$prefix" ]; then if [ -n "$prefix" ]; then
mkdir -p "$prefix"; mkdir -p "$prefix";
fi; fi;
local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
_accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray; concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install;
if [ -n "$__structuredAttrs" ]; then
flagsArray+=("${installTargets[@]:-install}");
else
flagsArray+=(${installTargets:-install});
fi;
echoCmd 'install flags' "${flagsArray[@]}"; echoCmd 'install flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}"; make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray; unset flagsArray;
@ -1281,6 +1390,116 @@ moveToOutput ()
done; done;
done done
} }
nixChattyLog ()
{
_nixLogWithLevel 5 "$*"
}
nixDebugLog ()
{
_nixLogWithLevel 6 "$*"
}
nixErrorLog ()
{
_nixLogWithLevel 0 "$*"
}
nixInfoLog ()
{
_nixLogWithLevel 3 "$*"
}
nixLog ()
{
[[ -z ${NIX_LOG_FD-} ]] && return 0;
local callerName="${FUNCNAME[1]}";
if [[ $callerName == "_callImplicitHook" ]]; then
callerName="${hookName:?}";
fi;
printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD"
}
nixNoticeLog ()
{
_nixLogWithLevel 2 "$*"
}
nixTalkativeLog ()
{
_nixLogWithLevel 4 "$*"
}
nixVomitLog ()
{
_nixLogWithLevel 7 "$*"
}
nixWarnLog ()
{
_nixLogWithLevel 1 "$*"
}
noBrokenSymlinks ()
{
local -r output="${1:?}";
local path;
local pathParent;
local symlinkTarget;
local -i numDanglingSymlinks=0;
local -i numReflexiveSymlinks=0;
local -i numUnreadableSymlinks=0;
if [[ ! -e $output ]]; then
nixWarnLog "skipping non-existent output $output";
return 0;
fi;
nixInfoLog "running on $output";
while IFS= read -r -d '' path; do
pathParent="$(dirname "$path")";
if ! symlinkTarget="$(readlink "$path")"; then
nixErrorLog "the symlink $path is unreadable";
numUnreadableSymlinks+=1;
continue;
fi;
if [[ $symlinkTarget == /* ]]; then
nixInfoLog "symlink $path points to absolute target $symlinkTarget";
else
nixInfoLog "symlink $path points to relative target $symlinkTarget";
symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")";
fi;
if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then
nixInfoLog "symlink $path points outside the Nix store; ignoring";
continue;
fi;
if [[ $path == "$symlinkTarget" ]]; then
nixErrorLog "the symlink $path is reflexive";
numReflexiveSymlinks+=1;
else
if [[ ! -e $symlinkTarget ]]; then
nixErrorLog "the symlink $path points to a missing target: $symlinkTarget";
numDanglingSymlinks+=1;
else
nixDebugLog "the symlink $path is irreflexive and points to a target which exists";
fi;
fi;
done < <(find "$output" -type l -print0);
if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then
nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks";
exit 1;
fi;
return 0
}
noBrokenSymlinksInAllOutputs ()
{
if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then
for output in $(getAllOutputNames);
do
noBrokenSymlinks "${!output}";
done;
fi
}
patchELF () patchELF ()
{ {
@ -1304,11 +1523,9 @@ patchPhase ()
runHook prePatch; runHook prePatch;
local -a patchesArray; local -a patchesArray;
if [ -n "$__structuredAttrs" ]; then concatTo patchesArray patches;
patchesArray=(${patches:+"${patches[@]}"}); local -a flagsArray;
else concatTo flagsArray patchFlags=-p1;
patchesArray=(${patches:-});
fi;
for i in "${patchesArray[@]}"; for i in "${patchesArray[@]}";
do do
echo "applying patch $i"; echo "applying patch $i";
@ -1327,12 +1544,6 @@ patchPhase ()
uncompress="lzma -d" uncompress="lzma -d"
;; ;;
esac; esac;
local -a flagsArray;
if [ -n "$__structuredAttrs" ]; then
flagsArray=("${patchFlags[@]:--p1}");
else
flagsArray=(${patchFlags:--p1});
fi;
$uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}";
done; done;
runHook postPatch runHook postPatch
@ -1341,7 +1552,7 @@ patchShebangs ()
{ {
local pathName; local pathName;
local update; local update=false;
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case "$1" in case "$1" in
--host) --host)
@ -1384,7 +1595,7 @@ patchShebangs ()
local f; local f;
while IFS= read -r -d '' f; do while IFS= read -r -d '' f; do
isScript "$f" || continue; isScript "$f" || continue;
read -r oldInterpreterLine < "$f"; read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ];
read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; read -r oldPath arg0 args <<< "${oldInterpreterLine:2}";
if [[ -z "${pathName:-}" ]]; then if [[ -z "${pathName:-}" ]]; then
if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then
@ -1396,22 +1607,22 @@ patchShebangs ()
if [[ "$oldPath" == *"/bin/env" ]]; then if [[ "$oldPath" == *"/bin/env" ]]; then
if [[ $arg0 == "-S" ]]; then if [[ $arg0 == "-S" ]]; then
arg0=${args%% *}; arg0=${args%% *};
args=${args#* }; [[ "$args" == *" "* ]] && args=${args#* } || args=;
newPath="$(PATH="${!pathName}" command -v "env" || true)"; newPath="$(PATH="${!pathName}" type -P "env" || true)";
args="-S $(PATH="${!pathName}" command -v "$arg0" || true) $args"; args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args";
else else
if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2;
exit 1; exit 1;
else else
newPath="$(PATH="${!pathName}" command -v "$arg0" || true)"; newPath="$(PATH="${!pathName}" type -P "$arg0" || true)";
fi; fi;
fi; fi;
else else
if [[ -z $oldPath ]]; then if [[ -z $oldPath ]]; then
oldPath="/bin/sh"; oldPath="/bin/sh";
fi; fi;
newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)"; newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)";
args="$arg0 $args"; args="$arg0 $args";
fi; fi;
newInterpreterLine="$newPath $args"; newInterpreterLine="$newPath $args";
@ -1448,18 +1659,19 @@ prependToVar ()
else else
useArray=false; useArray=false;
fi; fi;
if declare -p "$1" 2> /dev/null | grep -q '^'; then if type=$(declare -p "$1" 2> /dev/null); then
type="$(declare -p "$1")"; case "${type#* }" in
if [[ "$type" =~ "declare -A" ]]; then -A*)
echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2;
return 1; return 1
else ;;
if [[ "$type" =~ "declare -a" ]]; then -a*)
useArray=true; useArray=true
else ;;
useArray=false; *)
fi; useArray=false
fi; ;;
esac;
fi; fi;
shift; shift;
if $useArray; then if $useArray; then
@ -1504,6 +1716,7 @@ runHook ()
local hook; local hook;
for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"};
do do
_logHook "$hookName" "$hook" "$@";
_eval "$hook" "$@"; _eval "$hook" "$@";
done; done;
return 0 return 0
@ -1517,6 +1730,7 @@ runOneHook ()
local hook ret=1; local hook ret=1;
for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"};
do do
_logHook "$hookName" "$hook" "$@";
if _eval "$hook" "$@"; then if _eval "$hook" "$@"; then
ret=0; ret=0;
break; break;
@ -1555,18 +1769,16 @@ runPhase ()
if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then
return; return;
fi; fi;
if [[ -n $NIX_LOG_FD ]]; then
echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD";
fi;
showPhaseHeader "$curPhase"; showPhaseHeader "$curPhase";
dumpVars; dumpVars;
local startTime=$(date +"%s"); local startTime endTime;
startTime=$(date +"%s");
eval "${!curPhase:-$curPhase}"; eval "${!curPhase:-$curPhase}";
local endTime=$(date +"%s"); endTime=$(date +"%s");
showPhaseFooter "$curPhase" "$startTime" "$endTime"; showPhaseFooter "$curPhase" "$startTime" "$endTime";
if [ "$curPhase" = unpackPhase ]; then if [ "$curPhase" = unpackPhase ]; then
[ -n "${sourceRoot:-}" ] && chmod +x "${sourceRoot}"; [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}";
cd "${sourceRoot:-.}"; cd -- "${sourceRoot:-.}";
fi fi
} }
showPhaseFooter () showPhaseFooter ()
@ -1589,7 +1801,11 @@ showPhaseHeader ()
{ {
local phase="$1"; local phase="$1";
echo "Running phase: $phase" echo "Running phase: $phase";
if [[ -z ${NIX_LOG_FD-} ]]; then
return;
fi;
printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD"
} }
stripDirs () stripDirs ()
{ {
@ -1621,7 +1837,7 @@ stripDirs ()
echo "stripping (with command $cmd and flags $stripFlags) in $paths"; echo "stripping (with command $cmd and flags $stripFlags) in $paths";
local striperr; local striperr;
striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')";
find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -print0 | xargs -r -0 -n1 -- realpath -z | sort -u -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?;
[[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 );
rm "$striperr"; rm "$striperr";
find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null;
@ -1695,6 +1911,10 @@ substituteInPlace ()
fileNames+=("$arg"); fileNames+=("$arg");
shift; shift;
done; done;
if ! [[ "${#fileNames[@]}" -gt 0 ]]; then
echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2;
return 1;
fi;
for file in "${fileNames[@]}"; for file in "${fileNames[@]}";
do do
substitute "$file" "$file" "$@"; substitute "$file" "$file" "$@";
@ -1707,29 +1927,40 @@ substituteStream ()
local description=$2; local description=$2;
shift 2; shift 2;
while (( "$#" )); do while (( "$#" )); do
local replace_mode="$1";
case "$1" in case "$1" in
--replace) --replace)
if ! "$_substituteStream_has_warned_replace_deprecation"; then
echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2;
_substituteStream_has_warned_replace_deprecation=true;
fi;
replace_mode='--replace-warn'
;&
--replace-quiet | --replace-warn | --replace-fail)
pattern="$2"; pattern="$2";
replacement="$3"; replacement="$3";
shift 3; shift 3;
local savedvar; if ! [[ "${!var}" == *"$pattern"* ]]; then
savedvar="${!var}"; if [ "$replace_mode" == --replace-warn ]; then
eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
if [ "$pattern" != "$replacement" ]; then else
if [ "${!var}" == "$savedvar" ]; then if [ "$replace_mode" == --replace-fail ]; then
echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" 1>&2; printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
return 1;
fi; fi;
fi fi;
fi;
eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'
;; ;;
--subst-var) --subst-var)
local varName="$2"; local varName="$2";
shift 2; shift 2;
if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2;
return 1; return 1;
fi; fi;
if [ -z ${!varName+x} ]; then if [ -z ${!varName+x} ]; then
echo "substituteStream(): ERROR: variable \$$varName is unset" 1>&2; echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2;
return 1; return 1;
fi; fi;
pattern="@$varName@"; pattern="@$varName@";
@ -1743,7 +1974,7 @@ substituteStream ()
shift 3 shift 3
;; ;;
*) *)
echo "substituteStream(): ERROR: Invalid command line argument: $1" 1>&2; echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2;
return 1 return 1
;; ;;
esac; esac;
@ -1772,11 +2003,7 @@ unpackPhase ()
srcs="$src"; srcs="$src";
fi; fi;
local -a srcsArray; local -a srcsArray;
if [ -n "$__structuredAttrs" ]; then concatTo srcsArray srcs;
srcsArray=("${srcs[@]}");
else
srcsArray=($srcs);
fi;
local dirsBefore=""; local dirsBefore="";
for i in *; for i in *;
do do
@ -1833,7 +2060,7 @@ updateAutotoolsGnuConfigScriptsPhase ()
for f in $(find . -type f -name "$script"); for f in $(find . -type f -name "$script");
do do
echo "Updating Autotools / GNU config script to a newer upstream version: $f"; echo "Updating Autotools / GNU config script to a newer upstream version: $f";
cp -f "/nix/store/7lk76vdawbx478qq9lvi3mgf73rvcyhd-gnu-config-2023-09-19/$script" "$f"; cp -f "/nix/store/khmqxw6b9q7rgkv6hf3gcqf2igk03z1g-gnu-config-2024-01-01/$script" "$f";
done; done;
done done
} }
@ -1841,7 +2068,8 @@ updateSourceDateEpoch ()
{ {
local path="$1"; local path="$1";
local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ %p\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); [[ $path == -* ]] && path="./$path";
local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1));
local time="${res[0]//\.[0-9]*/}"; local time="${res[0]//\.[0-9]*/}";
local newestFile="${res[1]}"; local newestFile="${res[1]}";
if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then
@ -1860,4 +2088,4 @@ export TMP="$NIX_BUILD_TOP"
export TMPDIR="$NIX_BUILD_TOP" export TMPDIR="$NIX_BUILD_TOP"
export TEMP="$NIX_BUILD_TOP" export TEMP="$NIX_BUILD_TOP"
export TEMPDIR="$NIX_BUILD_TOP" export TEMPDIR="$NIX_BUILD_TOP"
eval "$shellHook" eval "${shellHook:-}"

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
.direnv/ .direnv/
.direnv/*
.direnv/** .direnv/**
.worktrees/**
.envrc .envrc

View file

@ -0,0 +1,156 @@
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = []
# Start AeroSpace at login
start-at-login = true
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature
accordion-padding = 10
# Possible values: tiles|accordion
default-root-container-layout = 'tiles'
# Possible values: horizontal|vertical|auto
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
# tall monitor (anything higher than wide) gets vertical orientation
default-root-container-orientation = 'auto'
# Mouse follows focus when focused monitor changes
# Drop it from your config, if you don't like this behavior
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
# Fallback value (if you omit the key): on-focused-monitor-changed = []
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
# Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app
automatically-unhide-macos-hidden-apps = true
# Possible values: (qwerty|dvorak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
preset = 'dvorak'
# Gaps between windows (inner-*) and between monitor edges (outer-*).
# Possible values:
# - Constant: gaps.outer.top = 8
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
# In this example, 24 is a default value when there is no match.
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
[gaps]
inner.horizontal = 0
inner.vertical = 0
outer.left = 0
outer.bottom = 0
outer.top = 0
outer.right = 0
# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
# Fallback value (if you omit the key): mode.main.binding = {}
[mode.main.binding]
# All possible keys:
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
# keypadMinus, keypadMultiply, keypadPlus
# - Arrows. left, down, up, right
# All possible modifiers: cmd, alt, ctrl, shift
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Kitty.app'
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-slash = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
# alt-h = 'focus left'
# alt-j = 'focus down'
# alt-k = 'focus up'
# alt-l = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#move
alt-shift-h = 'move left'
alt-shift-j = 'move down'
alt-shift-k = 'move up'
alt-shift-l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
alt-shift-minus = 'resize smart -50'
alt-shift-equal = 'resize smart +50'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
alt-1 = 'workspace 1'
alt-2 = 'workspace 2'
alt-3 = 'workspace 3'
alt-4 = 'workspace 4'
alt-5 = 'workspace 5'
alt-6 = 'workspace 6'
alt-7 = 'workspace 7'
alt-8 = 'workspace 8'
alt-9 = 'workspace 9'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
alt-shift-1 = 'move-node-to-workspace 1'
alt-shift-2 = 'move-node-to-workspace 2'
alt-shift-3 = 'move-node-to-workspace 3'
alt-shift-4 = 'move-node-to-workspace 4'
alt-shift-5 = 'move-node-to-workspace 5'
alt-shift-6 = 'move-node-to-workspace 6'
alt-shift-7 = 'move-node-to-workspace 7'
alt-shift-8 = 'move-node-to-workspace 8'
alt-shift-9 = 'move-node-to-workspace 9'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
alt-tab = 'workspace-back-and-forth'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
alt-shift-semicolon = 'mode service'
# 'service' binding mode declaration.
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
[mode.service.binding]
esc = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main'] # reset layout
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
backspace = ['close-all-windows-but-current', 'mode main']
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
#s = ['layout sticky tiling', 'mode main']
alt-shift-h = ['join-with left', 'mode main']
alt-shift-j = ['join-with down', 'mode main']
alt-shift-k = ['join-with up', 'mode main']
alt-shift-l = ['join-with right', 'mode main']
down = 'volume down'
up = 'volume up'
shift-down = ['volume set 0', 'mode main']

View file

@ -7,6 +7,7 @@
../profiles/git ../profiles/git
../profiles/task ../profiles/task
../profiles/kitty ../profiles/kitty
../profiles/tmux
# ../profiles/firefox # ../profiles/firefox
]; ];
@ -14,7 +15,7 @@
home.homeDirectory = "/Users/anishlakhwara"; home.homeDirectory = "/Users/anishlakhwara";
home.stateVersion = "22.05"; home.stateVersion = "22.05";
programs.zsh.initExtra = '' programs.zsh.initContent = ''
PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH
''; '';
@ -24,5 +25,8 @@
source = ./sketchybar; source = ./sketchybar;
recursive = true; recursive = true;
}; };
".config/aerospace" = {
source = ./aerospace;
};
}; };
} }

0
home/darwin/sketchybar/items/battery.sh Executable file → Normal file
View file

View file

@ -11,7 +11,6 @@
bottom bottom
gptfdisk gptfdisk
starship starship
iputils
jq jq
manix manix
moreutils moreutils
@ -42,7 +41,6 @@
file file
lsof lsof
atool atool
strace
zip zip
unzip unzip
rsync rsync
@ -147,6 +145,10 @@
disconnect_keyboard disconnect_keyboard
'') '')
] ++ lib.optionals pkgs.stdenv.isLinux [
# Linux-only packages
iputils
strace
]; ];
programs.zsh = { programs.zsh = {
@ -227,7 +229,7 @@
enableZshIntegration = true; enableZshIntegration = true;
}; };
services.kdeconnect.enable = true; services.kdeconnect.enable = pkgs.stdenv.isLinux;
home.shellAliases = { home.shellAliases = {
# quick cd # quick cd
@ -247,8 +249,8 @@
tree = "ls --tree --icons"; tree = "ls --tree --icons";
cat = "bat"; cat = "bat";
unzip = "aunpack"; unzip = "aunpack";
copy = "xclip -selection clipboard"; copy = if pkgs.stdenv.isDarwin then "pbcopy" else "xclip -selection clipboard";
paste = "xclip -selection clipboard -o"; paste = if pkgs.stdenv.isDarwin then "pbpaste" else "xclip -selection clipboard -o";
rm = "echo USE TRASH, FOOL: trash "; rm = "echo USE TRASH, FOOL: trash ";
trash = "trash-put"; trash = "trash-put";
make-secret = "< /dev/urandom \\tr -dc _A-Za-z0-9 | head -c \${1:-32};echo;"; make-secret = "< /dev/urandom \\tr -dc _A-Za-z0-9 | head -c \${1:-32};echo;";
@ -299,8 +301,14 @@
nepl = "n repl '<nixpkgs>'"; nepl = "n repl '<nixpkgs>'";
srch = "ns nixpkgs"; srch = "ns nixpkgs";
orch = "ns override"; orch = "ns override";
# need --impure for bitwig, something about my flake setup doesn't like allow unfree # Impure for bitwig on linux, not sure what it's for in darwin
nrb = "cd /tmp; sudo nixos-rebuild switch --impure --flake '/home/anish/usr/helm#curve'; cd $OLDPWD"; nrb = ''
if [[ "$OSTYPE" == "darwin"* ]]; then
cd ~/usr/helm && sudo darwin-rebuild switch --impure --flake ".#Anishs-MacBook-Pro" && cd $OLDPWD
else
cd /tmp && sudo nixos-rebuild switch --flake --impure '/home/anish/usr/helm#curve' && cd $OLDPWD
fi
'';
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD"; nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
ned = "cd /home/anish/usr/helm; vim; cd $OLDPWD"; ned = "cd /home/anish/usr/helm; vim; cd $OLDPWD";
ncd = "cd /home/anish/usr/helm"; ncd = "cd /home/anish/usr/helm";

View file

@ -12,7 +12,10 @@
userName = "Anish Lakhwara"; userName = "Anish Lakhwara";
userEmail = "anish+git@lakhwara.com"; userEmail = "anish+git@lakhwara.com";
delta.enable = true; delta.enable = true;
# TODO enable signing signing = {
signByDefault = true;
key = "7FC5DF072EF7B716";
};
ignores = [ ignores = [
"*~" "*~"
@ -56,6 +59,7 @@
pull.rebase = false; pull.rebase = false;
push.autoSetupRemote = true; push.autoSetupRemote = true;
init.defaultBranch = "main"; init.defaultBranch = "main";
"url \"git@github.com:\"" = { insteadOf = "https://github.com/"; };
}; };
aliases = { aliases = {
@ -94,6 +98,8 @@
# delete merged branches # delete merged branches
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d"; bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d";
undo = "!git reset HEAD~1 --mixed";
blm = "blame -w -C -C -C";
}; };
}; };
} }

View file

@ -0,0 +1,23 @@
background #0A0E14
foreground #B3B1AD
cursor #E6B450
selection_background #273747
color0 #000000
color8 #4D5566
color1 #FF3333
color9 #D96C75
color2 #C2D94C
color10 #91B362
color3 #FF8F40
color11 #F29668
color4 #59C2FF
color12 #6994BF
color5 #D4BFFF
color13 #A37ACC
color6 #95E6CB
color14 #4CBF99
color7 #ffffff
color15 #F0F0F0
selection_foreground #B3B1AD

View file

@ -0,0 +1,25 @@
#: This is a port of ayu Mirage color scheme
#: based on :
#: https://github.com/ayu-theme/ayu-colors
background #1F2430
foreground #CBCCC6
cursor #FFCC66
selection_background #33415E
color0 #000000
color8 #4D5566
color1 #FF3333
color9 #F27983
color2 #BAE67E
color10 #A6CC70
color3 #FFA759
color11 #F29E74
color4 #73D0FF
color12 #77A8D9
color5 #D4BFFF
color13 #A37ACC
color6 #95E6CB
color14 #4CBF99
color7 #ffffff
color15 #F0F0F0
selection_foreground #CBCCC6

View file

@ -0,0 +1,11 @@
{ pkgs, config, lib, ... }:
{
home.packages = with pkgs; [
kitty
];
home.file = {
".config/kitty/kitty.conf".source = ./kitty.conf;
".config/kitty/ayu.conf".source = ./ayu-kitty.conf;
};
}

View file

@ -0,0 +1,15 @@
include ayu.conf
font_family Hermit
font_size 13
bold_font auto
italic_font auto
bold_italic_font auto
open_url_with default
mouse_map left click ungrabbed mouse_click_url_or_select
confirm_os_window_close 0
enable_audio_bell no
hide_window_decorations titlebar-only
macos_option_as_alt left
-- Allows zen-mode.nvim to increase font size
-- allow_remote_control socket-only
-- listen_on unix:/tmp/kitty

View file

@ -0,0 +1,8 @@
{ pkgs }:
# Remove the conditional entirely for now to test
pkgs.vimUtils.buildVimPlugin {
pname = "amp-nvim";
version = "unstable";
src = /Users/anishlakhwara/usr/amp.nvim;
}

View file

@ -0,0 +1,5 @@
-- amp.nvim configuration
require('amp').setup({
auto_start = true,
log_level = "info"
})

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { lib, pkgs, ... }:
let let
customPlugins = { customPlugins = {
vim-zettel = pkgs.vimUtils.buildVimPlugin { vim-zettel = pkgs.vimUtils.buildVimPlugin {
@ -11,6 +11,15 @@ let
}; };
}; };
amp-nvim = pkgs.vimUtils.buildVimPlugin {
name = "amp-nvim";
src = pkgs.fetchFromGitHub {
owner = "sourcegraph";
repo = "amp.nvim";
rev = "main";
sha256 = "1n6d8nbakyg6yiq8mhhrvmsp9z0zb8cb67820jsg3wl6vqd1vwv5";
};
}
my-lspsaga = pkgs.vimUtils.buildVimPlugin { my-lspsaga = pkgs.vimUtils.buildVimPlugin {
name = "lspsaga.nvim"; name = "lspsaga.nvim";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -29,24 +38,6 @@ let
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo="; sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
}; };
}; };
leap = pkgs.vimUtils.buildVimPlugin {
name = "leap";
src = pkgs.fetchFromGitHub {
owner = "ggandor";
repo = "leap.nvim";
rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844";
sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k=";
};
};
nvim-navic = pkgs.vimUtils.buildVimPlugin {
name = "nvim-navic";
src = pkgs.fetchFromGitHub {
owner = "SmiteshP";
repo = "nvim-navic";
rev = "096b23e73c84a653fd317c0c10261875fa573a6d";
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
};
};
my-which-key-nvim = pkgs.vimUtils.buildVimPlugin { my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "which-key.nvim"; pname = "which-key.nvim";
version = "2022-05-04"; version = "2022-05-04";
@ -108,6 +99,19 @@ let
sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY="; sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY=";
}; };
}; };
gh-addressed = pkgs.vimUtils.buildVimPlugin {
pname = "gh-addressed";
version = "2024-09-17";
src = pkgs.fetchFromGitHub {
owner = "dlvhdr";
repo = "gh-addressed.nvim";
rev = "64c12f0f2a1d28afe53220da5fb86e1adb79be07";
sha256 = "0pxzq9jllw7rfspyy6j8dr464g0ph7xvh317l4iyva26ld8889mp";
};
doCheck = false;
doInstallCheck = false;
nvimRequireCheck = "none";
};
}; };
my-python-packages = python-packages: with python-packages; [ my-python-packages = python-packages: with python-packages; [
@ -145,7 +149,7 @@ in
extraConfig = '' extraConfig = ''
" so our custom files still get included " so our custom files still get included
set runtimepath+=/home/anish/.config/nvim/ " set runtimepath+=/home/anish/.config/nvim/
set tabstop=2 set tabstop=2
set showmatch set showmatch
set shiftwidth=2 set shiftwidth=2
@ -295,6 +299,11 @@ in
nnoremap <leader>gp :Git! push<CR> nnoremap <leader>gp :Git! push<CR>
nnoremap <leader>gd :Gdiff<CR> nnoremap <leader>gd :Gdiff<CR>
nnoremap <leader>gc :G commit -v -q %:p<CR> nnoremap <leader>gc :G commit -v -q %:p<CR>
" diffview keybindings
nnoremap <leader>do :DiffviewOpen<CR>
nnoremap <leader>dc :DiffviewClose<CR>
nnoremap <leader>dh :DiffviewFileHistory %<CR>
nnoremap <leader>df :DiffviewFileHistory<CR>
" kitaab " kitaab
"map <leader>cz :VimwikiIndex<CR>:ZettelNew "map <leader>cz :VimwikiIndex<CR>:ZettelNew
@ -470,6 +479,9 @@ in
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true}) vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
-- nicer diff view
vim.opt.diffopt = {'internal', 'filler', 'closeoff', 'algorithm:patience', 'indent-heuristic'}
-- autopairs -- autopairs
require('nvim-autopairs').setup{} require('nvim-autopairs').setup{}
@ -843,6 +855,21 @@ in
require("which-key").setup{} require("which-key").setup{}
require('leap').set_default_keymaps() require('leap').set_default_keymaps()
${lib.optionalString (customPlugins.amp-nvim != null) ''
-- Setup amp.nvim
require('amp').setup({
auto_start = true,
log_level = "info",
completion_enabled = true
})
-- require('amp.completion').setup({
-- keymaps = {
-- accept = "<C-y>",
-- dismiss = "<C-n>",
-- }
-- })
''}
-- supercollider -- supercollider
local scnvim = require 'scnvim' local scnvim = require 'scnvim'
local map = scnvim.map local map = scnvim.map
@ -905,6 +932,33 @@ in
-- Open the code actions for a visual selection. -- Open the code actions for a visual selection.
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts) map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
-- diffview setup
require('diffview').setup{
use_icons = true,
view = {
default = {
layout = "diff2_horizontal",
},
merge_tool = {
layout = "diff3_horizontal",
disable_diagnostics = true,
},
},
file_panel = {
listing_style = "tree",
win_config = {
position = "left",
width = 35,
},
},
file_history_panel = {
win_config = {
position = "bottom",
height = 16,
},
},
}
-- zen mode -- zen mode
require('zen-mode').setup{ require('zen-mode').setup{
window = { window = {
@ -968,7 +1022,7 @@ in
vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>') vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>')
-- Disable Ctrl+V in nvim so Kitty can handle paste -- Disable Ctrl+V in nvim so Kitty can handle paste
vim.keymap.set({'n', 'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true}) vim.keymap.set({'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true})
-- Pane resizing with Alt+Shift+hjkl (to match tmux) -- Pane resizing with Alt+Shift+hjkl (to match tmux)
vim.keymap.set('n', '<M-S-h>', '<Cmd>vertical resize -2<CR>', {silent = true}) vim.keymap.set('n', '<M-S-h>', '<Cmd>vertical resize -2<CR>', {silent = true})
@ -1179,6 +1233,7 @@ in
vim-fugitive vim-fugitive
gitsigns-nvim gitsigns-nvim
fzf-checkout-vim fzf-checkout-vim
diffview-nvim
# Clojure stuff # Clojure stuff
# conjure # conjure
@ -1186,30 +1241,23 @@ in
vim-sexp-mappings-for-regular-people vim-sexp-mappings-for-regular-people
fennel-vim fennel-vim
vim-tidal
# experimental # experimental
nvim-luapad nvim-luapad
gh-addressed
scnvim scnvim
leap leap-nvim
Navigator-nvim Navigator-nvim
vim-beancount vim-beancount
# vimtex # vimtex
# custom # custom
yuck-vim yuck-vim
nvim-parinfer nvim-parinfer
amp-nvim
# vim-processing # vim-processing
] ++ lib.optionals pkgs.stdenv.isLinux [
# amp.nvim for Sourcegraph Amp integration # Linux-only plugins
(pkgs.vimUtils.buildVimPlugin { vim-tidal # requires SuperCollider which is Linux-only
name = "amp-nvim"; ]
src = pkgs.fetchFromGitHub {
owner = "sourcegraph";
repo = "amp.nvim";
rev = "main";
sha256 = "1n6d8nbakyg6yiq8mhhrvmsp9z0zb8cb67820jsg3wl6vqd1vwv5";
};
})
];
withPython3 = true; withPython3 = true;
extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ]; extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ];
vimAlias = true; vimAlias = true;

View file

@ -0,0 +1,8 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

View file

@ -0,0 +1,15 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

View file

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -0,0 +1,4 @@
# 💤 LazyVim
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.

View file

@ -0,0 +1,2 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

View file

@ -0,0 +1,60 @@
{
"LazyVim": { "branch": "main", "commit": "12818a6cb499456f4903c5d8e68af43753ebc869" },
"SchemaStore.nvim": { "branch": "main", "commit": "54a2cf0105166d5a48172e81f12a2bf10cfc8b2c" },
"aerial.nvim": { "branch": "master", "commit": "e585934fef8d253dbc5655cff3deb3444e064e6c" },
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
"catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "62eba813b7501b39612146cbf29cd07f1d4ac29c" },
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
"dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
"grug-far.nvim": { "branch": "main", "commit": "ebab68b2150079732ae8074eefb261a124824139" },
"indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.ai": { "branch": "main", "commit": "a9b992b13d22a8db8df6beac25afa59a10b5584d" },
"mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" },
"mini.pairs": { "branch": "main", "commit": "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51" },
"mini.surround": { "branch": "main", "commit": "d8913ed23be0a1a4585ae34414821cc343a46174" },
"neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" },
"neovim-ayu": { "branch": "master", "commit": "6993189dd0ee38299879a1a0064718a8392e8713" },
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" },
"nvim-lspconfig": { "branch": "master", "commit": "911167921d49cd5c1c9b2436031d0da3945e787f" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
"nvim-treesitter": { "branch": "master", "commit": "04401b5dd17c3419dae5141677bd256f52d54733" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
"nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" },
"outline.nvim": { "branch": "main", "commit": "02a18194b3d2adfb537dd1a9f21d1fc29dd31382" },
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"sg.nvim": { "branch": "master", "commit": "8bdd4d19da2268072708d5fe18fda9c23e16509d" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-terraform-doc.nvim": { "branch": "main", "commit": "7ac642765615e6ff164ecfc82eb278aa68d06840" },
"telescope-terraform.nvim": { "branch": "main", "commit": "072c97023797ca1a874668aaa6ae0b74425335df" },
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
"tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
"ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
"vim-dadbod-ui": { "branch": "master", "commit": "0f51d8de368c8c6220973e8acd156d17da746f4c" },
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" },
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" }
}

View file

@ -0,0 +1,19 @@
{
"extras": [
"lazyvim.plugins.extras.editor.aerial",
"lazyvim.plugins.extras.editor.outline",
"lazyvim.plugins.extras.lang.go",
"lazyvim.plugins.extras.lang.helm",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.nix",
"lazyvim.plugins.extras.lang.sql",
"lazyvim.plugins.extras.lang.svelte",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.terraform",
"lazyvim.plugins.extras.lang.typescript"
],
"news": {
"NEWS.md": "6520"
},
"version": 6
}

View file

@ -0,0 +1,68 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here
-- Aggressive fugitive auto-reload with polling
local function setup_fugitive_aggressive_reload()
local timer = nil
local function refresh_fugitive()
-- Check all files for changes
vim.cmd("silent! checktime")
-- Force refresh any open fugitive buffers
for _, win in ipairs(vim.api.nvim_list_wins()) do
local buf = vim.api.nvim_win_get_buf(win)
if vim.api.nvim_buf_get_option(buf, "filetype") == "fugitive" then
vim.api.nvim_buf_call(buf, function()
pcall(vim.cmd, "silent! edit")
end)
end
end
end
local function start_polling()
if timer then vim.fn.timer_stop(timer) end
-- Poll every 2 seconds
timer = vim.fn.timer_start(2000, function()
refresh_fugitive()
end, { ["repeat"] = -1 })
end
local function stop_polling()
if timer then
vim.fn.timer_stop(timer)
timer = nil
end
end
local augroup = vim.api.nvim_create_augroup("FugitiveAggressiveReload", { clear = true })
-- Start polling when fugitive buffer opens
vim.api.nvim_create_autocmd("FileType", {
group = augroup,
pattern = "fugitive",
callback = start_polling,
})
-- Stop polling when no fugitive buffers are open
vim.api.nvim_create_autocmd("BufDelete", {
group = augroup,
callback = function()
-- Check if any fugitive buffers remain
local has_fugitive = false
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_buf_is_valid(buf) and vim.api.nvim_buf_get_option(buf, "filetype") == "fugitive" then
has_fugitive = true
break
end
end
if not has_fugitive then
stop_polling()
end
end,
})
end
-- Set up aggressive reload
setup_fugitive_aggressive_reload()

View file

@ -0,0 +1,21 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local map = vim.keymap.set
-- Navigation
map("n", "gt", "<cmd>bnext<cr>", { desc = "Next Buffer" })
map("n", "gT", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
map("n", "gq", "<cmd>bdelete<cr>", { desc = "Prev Buffer" })
map("n", "<leader>q", "<cmd>q<cr>", { desc = "Quit" })
-- Git
map("n", "<leader>gs", "<cmd>:G<cr>", { desc = "Git Status" })
map("n", "<leader>gb", "<cmd>Telescope git_branches<cr>", { desc = "Git Status" })
map("n", "<leader>gp", "<cmd>:G! push<cr>", { desc = "Git Status" })
-- Telescope
map("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Telescop Live Grep" })
-- Cody
map("n", "<leader>co", "<cmd>CodyChat<cr>", { desc = "Cody Chat" })

View file

@ -0,0 +1,57 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
require("sg").setup({})
-- require("ayu").setup({ mirage = true })
-- require("ayu").colorscheme()

View file

@ -0,0 +1,6 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
-- Enable autoread to detect external file changes
vim.opt.autoread = true

View file

@ -0,0 +1,8 @@
return {
{
"sourcegraph/amp.nvim",
branch = "main",
lazy = false,
opts = { auto_start = true, log_level = "info" },
},
}

View file

@ -0,0 +1,13 @@
return {
{
"sourcegraph/sg.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"hrsh7th/nvim-cmp",
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "cody" })
end,
},
}

View file

@ -0,0 +1,50 @@
return {
{
"catppuccin/nvim",
lazy = true,
name = "catppuccin",
opts = {
integrations = {
aerial = true,
alpha = true,
cmp = true,
dashboard = true,
flash = true,
gitsigns = true,
headlines = true,
illuminate = true,
indent_blankline = { enabled = true },
leap = true,
lsp_trouble = true,
mason = true,
markdown = true,
mini = true,
native_lsp = {
enabled = true,
underlines = {
errors = { "undercurl" },
hints = { "undercurl" },
warnings = { "undercurl" },
information = { "undercurl" },
},
},
navic = { enabled = true, custom_bg = "lualine" },
neotest = true,
neotree = true,
noice = true,
semantic_tokens = true,
telescope = true,
treesitter = true,
treesitter_context = true,
which_key = true,
},
},
},
{ "Shatur/neovim-ayu", lazy = false },
{
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin-macchiato",
},
},
}

View file

@ -0,0 +1,193 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
if true then return {} end
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
-- change trouble config
{
"folke/trouble.nvim",
-- opts will be merged with the parent spec
opts = { use_diagnostic_signs = true },
},
-- disable trouble
{ "folke/trouble.nvim", enabled = false },
-- override nvim-cmp and add cmp-emoji
{
"hrsh7th/nvim-cmp",
dependencies = { "hrsh7th/cmp-emoji" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
},
-- change some telescope options and a keymap to browse plugin files
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
},
-- change some options
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
},
-- add pyright to lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- pyright will be automatically installed with mason and loaded with lspconfig
pyright = {},
},
},
},
-- add tsserver and setup with typescript.nvim instead of lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"jose-elias-alvarez/typescript.nvim",
init = function()
require("lazyvim.util").lsp.on_attach(function(_, buffer)
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end)
end,
},
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- tsserver will be automatically installed with mason and loaded with lspconfig
tsserver = {},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
tsserver = function(_, opts)
require("typescript").setup({ server = opts })
return true
end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
},
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
})
end,
},
-- the opts function can also be used to change the default opts:
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, "😄")
end,
},
-- or you can return new options to override all the defaults
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
--[[add your custom lualine config here]]
}
end,
},
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
}

View file

@ -0,0 +1,6 @@
return {
{
"tpope/vim-fugitive",
lazy = false,
},
}

View file

@ -0,0 +1,14 @@
return {
{
"dlvhdr/gh-addressed.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"folke/trouble.nvim", -- optional
},
cmd = "GhReviewComments",
keys = {
{ "<leader>gc", "<cmd>GhReviewComments<cr>", desc = "GitHub Review Comments" },
},
},
}

View file

@ -0,0 +1,15 @@
return {
"echasnovski/mini.surround",
opts = {
mappings = {
add = "ys",
delete = "ds",
find = "gsf",
find_left = "gsF",
highlight = "gsh",
replace = "cs",
update_n_lines = "gsn",
},
},
}

View file

@ -0,0 +1,3 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120

View file

@ -9,6 +9,9 @@ set-environment -g COLORTERM "truecolor"
# Mouse works as expected # Mouse works as expected
set-option -g mouse on set-option -g mouse on
# Enable focus events for vim/neovim autoread
set -g focus-events on
# easy-to-remember split pane commands # easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}" bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}"

View file

@ -22,6 +22,7 @@
"wireshark" "wireshark"
"1password" "1password"
"orbstack" "orbstack"
# "aerospace"
# Communication Tools # Communication Tools
# Already installed manually # Already installed manually

View file

@ -3,7 +3,7 @@
{ {
imports = [ imports = [
./sketchybar ./sketchybar
./yabai # ./yabai # Now using aerospace
# ./casks # ./casks
# ../../modules/darwin/home-manager.nix # ../../modules/darwin/home-manager.nix
# ../../modules/shared # ../../modules/shared
@ -45,7 +45,7 @@
}; };
# Auto upgrade nix package and the daemon service. # Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true; # services.nix-daemon.enable = true; # removed in newer nix-darwin
nixpkgs.hostPlatform = "aarch64-darwin"; nixpkgs.hostPlatform = "aarch64-darwin";
programs.zsh.enable = true; programs.zsh.enable = true;
@ -55,7 +55,7 @@
settings.trusted-users = [ "@admin" "anishlakhwara" ]; settings.trusted-users = [ "@admin" "anishlakhwara" ];
gc = { gc = {
user = "root"; # user = "root"; # removed in newer nix-darwin
automatic = true; automatic = true;
interval = { Weekday = 0; Hour = 2; Minute = 0; }; interval = { Weekday = 0; Hour = 2; Minute = 0; };
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
@ -85,11 +85,14 @@
siji siji
font-awesome font-awesome
proggyfonts proggyfonts
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; }) nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
nerd-fonts.iosevka
]; ];
system = { system = {
stateVersion = 4; stateVersion = 4;
primaryUser = "anishlakhwara"; # required for newer nix-darwin
keyboard = { keyboard = {
enableKeyMapping = true; enableKeyMapping = true;

View file

@ -6,6 +6,7 @@ let
lituus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2lAb33LH3JNuOfBXt971u0tHe+NURFecQdfjwEj+C+ root@lituus"; lituus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2lAb33LH3JNuOfBXt971u0tHe+NURFecQdfjwEj+C+ root@lituus";
helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKrL6IDHNnHmxi0q9nzu87NOyidPm3HpE7klU368lEf root@helix"; helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKrL6IDHNnHmxi0q9nzu87NOyidPm3HpE7klU368lEf root@helix";
helix2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2G81z1E51ioJQGLHnTJEjgSdBqLM6mb72Z+0atE6Bf root@helix"; helix2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2G81z1E51ioJQGLHnTJEjgSdBqLM6mb72Z+0atE6Bf root@helix";
work = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHOnfDvR2D2nGnC+DZYDUXiokzz+eLfZwkp+O8WjWutp anishlakhwara@Anishs-MacBook-Pro.local";
curve = [ system user ]; curve = [ system user ];
allUserKeys = [ system user mossnet ]; allUserKeys = [ system user mossnet ];
systemOnly = [ system mossnet lituus helix ]; systemOnly = [ system mossnet lituus helix ];
@ -34,4 +35,6 @@ in
"box-wg.age".publicKeys = [ mossnet ]; "box-wg.age".publicKeys = [ mossnet ];
"wallabag-password.age".publicKeys = [ mossnet ]; "wallabag-password.age".publicKeys = [ mossnet ];
"wallabag-secret.age".publicKeys = [ mossnet ]; "wallabag-secret.age".publicKeys = [ mossnet ];
"work-wg.age".publicKeys = [ work user system ];
} }

BIN
secrets/work-wg.age Normal file

Binary file not shown.