Compare commits

..

1 commit

Author SHA1 Message Date
Anish Lakhwara 2ed248f005 initial install for droid 2024-10-05 07:41:43 +00:00
115 changed files with 788 additions and 4958 deletions

View file

@ -0,0 +1,8 @@
#!/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
AS='as'
export AS
BASH='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
BASH='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
CC='gcc'
export CC
CONFIG_SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
CONFIG_SHELL='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
export CONFIG_SHELL
CXX='g++'
export CXX
HOSTTYPE='x86_64'
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'
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'
export HOST_PATH
IFS='
'
@ -25,25 +25,25 @@ LD='ld'
export LD
LINENO='76'
MACHTYPE='x86_64-pc-linux-gnu'
NIX_BINTOOLS='/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44'
NIX_BINTOOLS='/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40'
export NIX_BINTOOLS
NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
NIX_BUILD_CORES='4'
export NIX_BUILD_CORES
NIX_CC='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
NIX_CC='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0'
export NIX_CC
NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
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'
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'
export NIX_CFLAGS_COMPILE
NIX_CONFIG='experimental-features = nix-command flakes'
export NIX_CONFIG
NIX_ENFORCE_NO_NATIVE='1'
export NIX_ENFORCE_NO_NATIVE
NIX_HARDENING_ENABLE='bindnow format fortify fortify3 pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs'
NIX_HARDENING_ENABLE='fortify fortify3 stackprotector pic strictoverflow format relro bindnow'
export NIX_HARDENING_ENABLE
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'
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'
export NIX_LDFLAGS
NIX_NO_SELF_RPATH='1'
NIX_STORE='/nix/store'
@ -58,15 +58,13 @@ OLDPWD=''
export OLDPWD
OPTERR='1'
OSTYPE='linux-gnu'
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'
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'
export PATH
PS4='+ '
RANLIB='ranlib'
export RANLIB
READELF='readelf'
export READELF
SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
export SHELL
SIZE='size'
export SIZE
SOURCE_DATE_EPOCH='315532800'
@ -75,11 +73,10 @@ STRINGS='strings'
export STRINGS
STRIP='strip'
export STRIP
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'
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'
export XDG_DATA_DIRS
__structuredAttrs=''
export __structuredAttrs
_substituteStream_has_warned_replace_deprecation='false'
buildInputs=''
export buildInputs
buildPhase='{ echo "------------------------------------------------------------";
@ -92,14 +89,14 @@ buildPhase='{ echo "------------------------------------------------------------
} >> "$out"
'
export buildPhase
builder='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
builder='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
export builder
cmakeFlags=''
export cmakeFlags
configureFlags=''
export configureFlags
defaultBuildInputs=''
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'
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'
depsBuildBuild=''
export depsBuildBuild
depsBuildBuildPropagated=''
@ -130,12 +127,12 @@ declare -a envHostTargetHooks=('ccWrapper_addCVars' 'bintoolsWrapper_addLDVars'
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' )
guess='4'
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'
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'
mesonFlags=''
export mesonFlags
name='nix-shell-env'
export name
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'
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'
export nativeBuildInputs
out='/home/anish/usr/helm/outputs/out'
export out
@ -154,14 +151,14 @@ patches=''
export patches
phases='buildPhase'
export phases
pkg='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
pkg='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0'
declare -a pkgsBuildBuild=()
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 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 pkgsBuildTarget=()
declare -a pkgsHostHost=()
declare -a pkgsHostTarget=()
declare -a pkgsTargetTarget=()
declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' )
declare -a postFixupHooks=('_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' )
declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' )
declare -a preConfigureHooks=('_multioutConfig' )
preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase'
@ -176,17 +173,42 @@ declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build
propagatedNativeBuildInputs=''
export propagatedNativeBuildInputs
declare -a propagatedTargetDepFiles=('propagated-target-target-deps' )
shell='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
shell='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
export shell
shellHook=''
export shellHook
stdenv='/nix/store/p2mnji2cdxgf6h27hlqzqf7g8f9bqfsi-stdenv-linux'
stdenv='/nix/store/kv5wkk7xgc8paw9azshzlmxraffqcg0i-stdenv-linux'
export stdenv
strictDeps=''
export strictDeps
system='x86_64-linux'
export system
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 ()
{
@ -252,10 +274,13 @@ _allFlags ()
{
export system pname name version;
while IFS='' read -r varName; do
nixTalkativeLog "@${varName}@ -> ${!varName}";
for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }');
do
if (( "${NIX_DEBUG:-0}" >= 1 )); then
printf "@%s@ -> %q\n" "${varName}" "${!varName}" 1>&2;
fi;
args+=("--subst-var" "$varName");
done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }')
done
}
_assignFirst ()
{
@ -291,15 +316,12 @@ _callImplicitHook ()
local def="$1";
local hookName="$2";
if declare -F "$hookName" > /dev/null; then
nixTalkativeLog "calling implicit '$hookName' function hook";
"$hookName";
else
if type -p "$hookName" > /dev/null; then
nixTalkativeLog "sourcing implicit '$hookName' script hook";
source "$hookName";
else
if [ -n "${!hookName:-}" ]; then
nixTalkativeLog "evaling implicit '$hookName' string hook";
eval "${!hookName}";
else
return "$def";
@ -319,15 +341,14 @@ _defaultUnpack ()
echo "Did you specify two \"srcs\" with the same \"name\"?";
return 1;
fi;
cp -r --preserve=mode,timestamps --reflink=auto -- "$fn" "$destination";
cp -pr --reflink=auto -- "$fn" "$destination";
else
case "$fn" in
*.tar.xz | *.tar.lzma | *.txz)
( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn";
true ) | tar xf - --mode=+w --warning=no-timestamp
xz -d < "$fn" | tar xf - --warning=no-timestamp
;;
*.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz)
tar xf "$fn" --mode=+w --warning=no-timestamp
tar xf "$fn" --warning=no-timestamp
;;
*)
return 1
@ -343,7 +364,7 @@ _doStrip ()
local -ra allDirs=(stripAllList stripAllListTarget);
local -ra stripCmds=(STRIP STRIP_FOR_TARGET);
local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET);
stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks};
stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin};
stripDebugListTarget=${stripDebugListTarget[*]:-};
stripAllList=${stripAllList[*]:-};
stripAllListTarget=${stripAllListTarget[*]:-};
@ -371,40 +392,6 @@ _eval ()
eval "$1";
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 ()
{
@ -538,7 +525,7 @@ _multioutConfig ()
shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')";
fi;
fi;
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 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 installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal
}
_multioutDevs ()
@ -599,47 +586,6 @@ _multioutPropagateDev ()
echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs;
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 ()
{
@ -670,7 +616,6 @@ activatePackage ()
local -r targetOffset="$3";
(( hostOffset <= targetOffset )) || exit 1;
if [ -f "$pkg" ]; then
nixTalkativeLog "sourcing setup hook '$pkg'";
source "$pkg";
fi;
if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then
@ -683,7 +628,6 @@ activatePackage ()
addToSearchPath _HOST_PATH "$pkg/bin";
fi;
if [[ -f "$pkg/nix-support/setup-hook" ]]; then
nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'";
source "$pkg/nix-support/setup-hook";
fi
}
@ -724,19 +668,18 @@ appendToVar ()
else
useArray=false;
fi;
if type=$(declare -p "$1" 2> /dev/null); then
case "${type#* }" in
-A*)
echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2;
return 1
;;
-a*)
useArray=true
;;
*)
useArray=false
;;
esac;
if declare -p "$1" 2> /dev/null | grep -q '^'; then
type="$(declare -p "$1")";
if [[ "$type" =~ "declare -A" ]]; then
echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2;
return 1;
else
if [[ "$type" =~ "declare -a" ]]; then
useArray=true;
else
useArray=false;
fi;
fi;
fi;
shift;
if $useArray; then
@ -798,8 +741,8 @@ buildPhase ()
echo "no Makefile or custom buildPhase, doing nothing";
else
foundMakefile=1;
local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray;
local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
_accumFlagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray;
echoCmd 'build flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray;
@ -829,18 +772,25 @@ checkPhase ()
fi;
if [[ -z "${checkTarget:-}" ]]; then
if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then
checkTarget="check";
checkTarget=check;
else
if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then
checkTarget="test";
checkTarget=test;
fi;
fi;
fi;
if [[ -z "${checkTarget:-}" ]]; then
echo "no check/test target in ${makefile:-Makefile}, doing nothing";
else
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget;
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
_accumFlagsArray makeFlags makeFlagsArray;
if [ -n "$__structuredAttrs" ]; then
flagsArray+=("${checkFlags[@]:-VERBOSE=y}");
else
flagsArray+=(${checkFlags:-VERBOSE=y});
fi;
_accumFlagsArray checkFlagsArray;
flagsArray+=(${checkTarget});
echoCmd 'check flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray;
@ -870,67 +820,6 @@ compressManPages ()
fi;
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 ()
{
@ -964,13 +853,10 @@ configurePhase ()
prependToVar configureFlags --disable-static;
fi;
fi;
if [ -z "${dontPatchShebangsInConfigure:-}" ]; then
patchShebangs --build "$configureScript";
fi;
fi;
if [ -n "$configureScript" ]; then
local -a flagsArray;
concatTo flagsArray configureFlags configureFlagsArray;
_accumFlagsArray configureFlags configureFlagsArray;
echoCmd 'configure flags' "${flagsArray[@]}";
$configureScript "${flagsArray[@]}";
unset flagsArray;
@ -992,7 +878,8 @@ distPhase ()
runHook preDist;
local flagsArray=();
concatTo flagsArray distFlags distFlagsArray distTarget=dist;
_accumFlagsArray distFlags distFlagsArray;
flagsArray+=(${distTarget:-dist});
echo 'dist flags: %q' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}";
if [ "${dontCopyDist:-0}" != 1 ]; then
@ -1005,9 +892,7 @@ dumpVars ()
{
if [ "${noDumpEnvVars:-0}" != 1 ]; then
{
install -m 0600 /dev/null "$NIX_BUILD_TOP/env-vars" && export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars"
} || true;
export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars" || true;
fi
}
echoCmd ()
@ -1056,7 +941,7 @@ findInputs ()
local var="${!varRef}";
unset -v varVar varRef;
local varSlice="$var[*]";
case " ${!varSlice-} " in
case "${!varSlice-}" in
*" $pkg "*)
return 0
;;
@ -1125,7 +1010,7 @@ fixupPhase ()
for output in $(getAllOutputNames);
do
if [ -e "${!output}" ]; then
chmod -R u+w,u-s,g-s "${!output}";
chmod -R u+w "${!output}";
fi;
done;
runHook preFixup;
@ -1151,9 +1036,9 @@ fixupPhase ()
done;
unset -v hook;
fi;
if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then
if [ -n "${propagatedUserEnvPkgs:-}" ]; then
mkdir -p "${!outputBin}/nix-support";
printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages";
printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages";
fi;
runHook postFixup
}
@ -1210,7 +1095,7 @@ getRole ()
role_post='_FOR_TARGET'
;;
*)
echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2;
return 1
;;
esac
@ -1239,7 +1124,7 @@ getTargetRoleWrapper ()
export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1
;;
*)
echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2;
return 1
;;
esac
@ -1254,8 +1139,9 @@ installCheckPhase ()
if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then
echo "no installcheck target in ${makefile:-Makefile}, doing nothing";
else
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck;
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
_accumFlagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray;
flagsArray+=(${installCheckTarget:-installcheck});
echoCmd 'installcheck flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray;
@ -1277,8 +1163,13 @@ installPhase ()
if [ -n "$prefix" ]; then
mkdir -p "$prefix";
fi;
local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install;
local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
_accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray;
if [ -n "$__structuredAttrs" ]; then
flagsArray+=("${installTargets[@]:-install}");
else
flagsArray+=(${installTargets:-install});
fi;
echoCmd 'install flags' "${flagsArray[@]}";
make ${makefile:+-f $makefile} "${flagsArray[@]}";
unset flagsArray;
@ -1390,116 +1281,6 @@ moveToOutput ()
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 ()
{
@ -1523,9 +1304,11 @@ patchPhase ()
runHook prePatch;
local -a patchesArray;
concatTo patchesArray patches;
local -a flagsArray;
concatTo flagsArray patchFlags=-p1;
if [ -n "$__structuredAttrs" ]; then
patchesArray=(${patches:+"${patches[@]}"});
else
patchesArray=(${patches:-});
fi;
for i in "${patchesArray[@]}";
do
echo "applying patch $i";
@ -1544,6 +1327,12 @@ patchPhase ()
uncompress="lzma -d"
;;
esac;
local -a flagsArray;
if [ -n "$__structuredAttrs" ]; then
flagsArray=("${patchFlags[@]:--p1}");
else
flagsArray=(${patchFlags:--p1});
fi;
$uncompress < "$i" 2>&1 | patch "${flagsArray[@]}";
done;
runHook postPatch
@ -1552,7 +1341,7 @@ patchShebangs ()
{
local pathName;
local update=false;
local update;
while [[ $# -gt 0 ]]; do
case "$1" in
--host)
@ -1595,7 +1384,7 @@ patchShebangs ()
local f;
while IFS= read -r -d '' f; do
isScript "$f" || continue;
read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ];
read -r oldInterpreterLine < "$f";
read -r oldPath arg0 args <<< "${oldInterpreterLine:2}";
if [[ -z "${pathName:-}" ]]; then
if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then
@ -1607,22 +1396,22 @@ patchShebangs ()
if [[ "$oldPath" == *"/bin/env" ]]; then
if [[ $arg0 == "-S" ]]; then
arg0=${args%% *};
[[ "$args" == *" "* ]] && args=${args#* } || args=;
newPath="$(PATH="${!pathName}" type -P "env" || true)";
args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args";
args=${args#* };
newPath="$(PATH="${!pathName}" command -v "env" || true)";
args="-S $(PATH="${!pathName}" command -v "$arg0" || true) $args";
else
if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2;
exit 1;
else
newPath="$(PATH="${!pathName}" type -P "$arg0" || true)";
newPath="$(PATH="${!pathName}" command -v "$arg0" || true)";
fi;
fi;
else
if [[ -z $oldPath ]]; then
oldPath="/bin/sh";
fi;
newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)";
newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)";
args="$arg0 $args";
fi;
newInterpreterLine="$newPath $args";
@ -1659,19 +1448,18 @@ prependToVar ()
else
useArray=false;
fi;
if type=$(declare -p "$1" 2> /dev/null); then
case "${type#* }" in
-A*)
echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2;
return 1
;;
-a*)
useArray=true
;;
*)
useArray=false
;;
esac;
if declare -p "$1" 2> /dev/null | grep -q '^'; then
type="$(declare -p "$1")";
if [[ "$type" =~ "declare -A" ]]; then
echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2;
return 1;
else
if [[ "$type" =~ "declare -a" ]]; then
useArray=true;
else
useArray=false;
fi;
fi;
fi;
shift;
if $useArray; then
@ -1716,7 +1504,6 @@ runHook ()
local hook;
for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"};
do
_logHook "$hookName" "$hook" "$@";
_eval "$hook" "$@";
done;
return 0
@ -1730,7 +1517,6 @@ runOneHook ()
local hook ret=1;
for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"};
do
_logHook "$hookName" "$hook" "$@";
if _eval "$hook" "$@"; then
ret=0;
break;
@ -1769,16 +1555,18 @@ runPhase ()
if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then
return;
fi;
if [[ -n $NIX_LOG_FD ]]; then
echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD";
fi;
showPhaseHeader "$curPhase";
dumpVars;
local startTime endTime;
startTime=$(date +"%s");
local startTime=$(date +"%s");
eval "${!curPhase:-$curPhase}";
endTime=$(date +"%s");
local endTime=$(date +"%s");
showPhaseFooter "$curPhase" "$startTime" "$endTime";
if [ "$curPhase" = unpackPhase ]; then
[ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}";
cd -- "${sourceRoot:-.}";
[ -n "${sourceRoot:-}" ] && chmod +x "${sourceRoot}";
cd "${sourceRoot:-.}";
fi
}
showPhaseFooter ()
@ -1801,11 +1589,7 @@ showPhaseHeader ()
{
local phase="$1";
echo "Running phase: $phase";
if [[ -z ${NIX_LOG_FD-} ]]; then
return;
fi;
printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD"
echo "Running phase: $phase"
}
stripDirs ()
{
@ -1837,7 +1621,7 @@ stripDirs ()
echo "stripping (with command $cmd and flags $stripFlags) in $paths";
local striperr;
striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')";
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=$?;
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=$?;
[[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 );
rm "$striperr";
find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null;
@ -1911,10 +1695,6 @@ substituteInPlace ()
fileNames+=("$arg");
shift;
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[@]}";
do
substitute "$file" "$file" "$@";
@ -1927,40 +1707,29 @@ substituteStream ()
local description=$2;
shift 2;
while (( "$#" )); do
local replace_mode="$1";
case "$1" in
--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";
replacement="$3";
shift 3;
if ! [[ "${!var}" == *"$pattern"* ]]; then
if [ "$replace_mode" == --replace-warn ]; then
printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
else
if [ "$replace_mode" == --replace-fail ]; then
printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
return 1;
fi;
local savedvar;
savedvar="${!var}";
eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}';
if [ "$pattern" != "$replacement" ]; then
if [ "${!var}" == "$savedvar" ]; then
echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" 1>&2;
fi;
fi;
eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'
fi
;;
--subst-var)
local varName="$2";
shift 2;
if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2;
echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2;
return 1;
fi;
if [ -z ${!varName+x} ]; then
echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2;
echo "substituteStream(): ERROR: variable \$$varName is unset" 1>&2;
return 1;
fi;
pattern="@$varName@";
@ -1974,7 +1743,7 @@ substituteStream ()
shift 3
;;
*)
echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2;
echo "substituteStream(): ERROR: Invalid command line argument: $1" 1>&2;
return 1
;;
esac;
@ -2003,7 +1772,11 @@ unpackPhase ()
srcs="$src";
fi;
local -a srcsArray;
concatTo srcsArray srcs;
if [ -n "$__structuredAttrs" ]; then
srcsArray=("${srcs[@]}");
else
srcsArray=($srcs);
fi;
local dirsBefore="";
for i in *;
do
@ -2060,7 +1833,7 @@ updateAutotoolsGnuConfigScriptsPhase ()
for f in $(find . -type f -name "$script");
do
echo "Updating Autotools / GNU config script to a newer upstream version: $f";
cp -f "/nix/store/khmqxw6b9q7rgkv6hf3gcqf2igk03z1g-gnu-config-2024-01-01/$script" "$f";
cp -f "/nix/store/7lk76vdawbx478qq9lvi3mgf73rvcyhd-gnu-config-2023-09-19/$script" "$f";
done;
done
}
@ -2068,8 +1841,7 @@ updateSourceDateEpoch ()
{
local path="$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 -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 newestFile="${res[1]}";
if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then
@ -2088,4 +1860,4 @@ export TMP="$NIX_BUILD_TOP"
export TMPDIR="$NIX_BUILD_TOP"
export TEMP="$NIX_BUILD_TOP"
export TEMPDIR="$NIX_BUILD_TOP"
eval "${shellHook:-}"
eval "$shellHook"

3
.gitignore vendored
View file

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

View file

@ -40,8 +40,7 @@ D('sealight.xyz', REG_NONE, DnsProvider(DNS_HEDNS),
A('bin', '69.61.2.203', TTL(300)),
A('ci', '69.61.2.203', TTL(300)),
A('write', '69.61.2.203', TTL(300)),
A('photos', '69.61.2.203', TTL(300)),
// vultr: lituus
// vultr -> nulled: lituus
A('@', '45.77.48.108', TTL(300)),
A('jitsi', '45.77.48.108', TTL(300)),
A('chat', '45.77.48.108', TTL(300)),

1015
flake.lock

File diff suppressed because it is too large Load diff

300
flake.nix
View file

@ -3,15 +3,16 @@
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# ngipkgs.url = "github:Chickensoupwithrice/ngipkgs?ref=aynish/atomic-server-module";
# ngipkgs-local.url = "path:/home/anish/usr/ngipkgs";
nix-on-droid.url = "github:nix-community/nix-on-droid/release-24.05";
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
nix-on-droid.inputs.home-manager.follows = "home-manager";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-25.05";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hardware.url = "github:nixos/nixos-hardware";
@ -27,8 +28,7 @@
poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main";
poonam.inputs.nixpkgs.follows = "nixpkgs";
basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main";
vimwikicli.url =
"git+ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli?ref=main";
vimwikicli.url = "git+ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli?ref=main";
basant.inputs.nixpkgs.follows = "nixpkgs";
basant.inputs.poonam.follows = "poonam";
vimwikicli.inputs.nixpkgs.follows = "nixpkgs";
@ -38,39 +38,6 @@
# Matrix
nix-matrix-appservices.url = "gitlab:coffeetables/nix-matrix-appservices";
# Darwin
darwin = {
url = "github:LnL7/nix-darwin/nix-darwin-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew = {
url = "github:zhaofengli-wip/nix-homebrew";
};
homebrew-bundle = {
url = "github:homebrew/homebrew-bundle";
flake = false;
};
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
# Steam Deck / Gaming
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "unstable";
};
# Tangled (atproto tools)
tangled = {
url = "git+https://tangled.org/@tangled.org/core";
inputs.nixpkgs.follows = "nixpkgs";
};
# Others
nur.url = "github:nix-community/NUR";
rust-overlay = {
@ -79,10 +46,6 @@
};
tidalcycles.url = "github:mitchmindtree/tidalcycles.nix";
tidalcycles.inputs.nixpkgs.follows = "unstable";
autohide-tdrop = {
url = "github:I-Want-ToBelieve/autohide-tdrop";
inputs.nixpkgs.follows = "nixpkgs";
};
# TODO hundred rabbits software
# TODO needs secrets
# dhyan.url = "git+ssh://gitea@git.sealight.xyz/aynish/dhyan?ref=main";
@ -92,10 +55,25 @@
# muneem.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, unstable, nixos-hardware, home-manager, deploy-rs
, agenix, disko, basant, grasp, nix-matrix-appservices, nur, tidalcycles
, rust-overlay, vimwikicli, autohide-tdrop, darwin, nix-homebrew, homebrew-bundle
, homebrew-core, homebrew-cask, jovian, tangled, ... }@inputs:
outputs =
{ self
, nixpkgs
, unstable
, nixos-hardware
, home-manager
, nix-on-droid
, deploy-rs
, agenix
, disko
, basant
, grasp
, nix-matrix-appservices
, nur
, tidalcycles
, rust-overlay
, vimwikicli
, ...
}@inputs:
let
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
@ -111,124 +89,61 @@
};
vimwikiOverlay = final: prev: {
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
autohide-tdrop = autohide-tdrop.packages.${prev.system}.default;
};
nixpkgsFor = forAllSystems (system:
import nixpkgs {
inherit system;
config = {
permittedInsecurePackages = [
"olm-3.2.16"
];
allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"ripcord"
"vcv-rack"
"SunVox"
"renoise"
"bitwig-studio-unwrapped"
];
};
overlays = [
rust-overlay.overlays.default
tidalcycles.overlays.default
agenix.overlays.default
nur.overlay
# nix-matrix-appservices.overlay # nixpkgs has these packages and newer ones at that
unstableOverlay
vimwikiOverlay
self.overlays.additions
self.overlays.modifications
];
});
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
"ripcord"
"vcv-rack"
"SunVox"
"renoise"
];
# config.permittedInsecurePackages = [
# "python3.10-django-3.1.14" # Needed for archivebox deployments on curve
# # Check when archive box updates it's dependeny
# ];
overlays = [
rust-overlay.overlays.default
tidalcycles.overlays.default
agenix.overlays.default
nur.overlay
nix-matrix-appservices.overlay
unstableOverlay
vimwikiOverlay
self.overlays.additions
self.overlays.modifications
];
});
# for when space matters
litePkgsFor = forAllSystems (system:
import nixpkgs {
inherit system;
# config.permittedInsecurePackages = [
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
# # Check when archive box updates it's dependeny
# ];
overlays = [
agenix.overlays.default
tangled.overlays.default # atproto tools only on lite deployments
self.overlays.additions
self.overlays.modifications
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
];
});
# Package set for Darwin systems
darwinPkgsFor = forAllSystems (system:
import nixpkgs {
inherit system;
config = {
permittedInsecurePackages = [
"olm-3.2.16"
];
allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"ripcord"
"vcv-rack"
"SunVox"
"renoise"
];
};
overlays = [
rust-overlay.overlays.default
tidalcycles.overlays.default
agenix.overlays.default
nur.overlay
unstableOverlay
vimwikiOverlay
self.overlays.additions
self.overlays.modifications
];
});
# Package set for Steam Deck (gaming-focused)
deckPkgsFor = forAllSystems (system:
import unstable {
inherit system;
config = {
permittedInsecurePackages = [
"olm-3.2.16"
];
allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"ripcord"
"vcv-rack"
"SunVox"
"renoise"
"steam"
"steam-original"
"steam-runtime"
];
};
overlays = [
rust-overlay.overlays.default
tidalcycles.overlays.default
agenix.overlays.default
nur.overlay
unstableOverlay
vimwikiOverlay
self.overlays.additions
self.overlays.modifications
];
});
in {
litePkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
# config.permittedInsecurePackages = [
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
# # Check when archive box updates it's dependeny
# ];
overlays = [
agenix.overlays.default
self.overlays.additions
self.overlays.modifications
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
];
});
in
{
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
in import ./pkgs { pkgs = pkgs; });
in import ./pkgs { pkgs = pkgs; }
);
# Devshell for bootstrapping
# Acessible through 'nix develop' or 'nix-shell' (legacy)
devShells = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
in import ./shell.nix { pkgs = pkgs; });
in import ./shell.nix { pkgs = pkgs; }
);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays;
@ -320,49 +235,7 @@
nix.registry.nixpkgs.flake = nixpkgs;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.anish = import ./home/dev;
}
];
};
deck = unstable.lib.nixosSystem rec {
specialArgs = { inherit inputs self; };
system = "x86_64-linux";
pkgs = deckPkgsFor.${system};
modules = [
./hosts/deck
jovian.nixosModules.default
self.nixosModules.wireguard
agenix.nixosModules.age
self.nixosModules.backup
home-manager.nixosModules.home-manager
{
nix.registry.nixpkgs.flake = unstable;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.anish = import ./home/gui;
}
];
};
};
# Darwin configuration entrypoint
darwinConfigurations = {
"Anishs-MacBook-Pro" = darwin.lib.darwinSystem rec {
system = "aarch64-darwin";
pkgs = darwinPkgsFor.${system};
specialArgs = { inherit inputs self; };
modules = [
./hosts/darwin
home-manager.darwinModules.home-manager
agenix.darwinModules.default
{
users.users.anishlakhwara.home = "/Users/anishlakhwara";
home-manager = {
users.anishlakhwara = import ./home/darwin;
useGlobalPkgs = true;
useUserPackages = true;
};
home-manager.users.anish = import ./home/core;
}
];
};
@ -372,13 +245,28 @@
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"anish@work" = home-manager.lib.homeManagerConfiguration {
pkgs =
nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
pkgs = nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs; };
modules = [ ./home/core.nix ./home/profiles/firefox ];
modules = [
./home/core.nix
./home/profiles/firefox
];
};
};
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = import nixpkgs { system = "aarch64-linux"; };
modules = [
./hosts/droid
{
home-manager = {
config = ./home/core/default.nix;
useGlobalPkgs = true;
};
}
];
};
deploy.nodes = {
box = {
hostname = "mossnet.lan";
@ -387,17 +275,15 @@
remoteBuild = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.box;
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.box;
};
};
lituus = {
hostname = "sealight.xyz";
autoRollback = false;
# autoRollback = false;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.lituus;
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.lituus;
};
};
helix = {
@ -406,13 +292,11 @@
magicRollback = false;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.helix;
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.helix;
};
};
};
# checks = builtins.mapAttrs
# (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
}

View file

@ -4,7 +4,7 @@
../profiles/cli
../profiles/direnv
../profiles/git
../profiles/tmux
../profiles/nvim
];
home.stateVersion = "22.05";
}

View file

@ -1,156 +0,0 @@
# 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

@ -1,32 +0,0 @@
{ self, pkgs, ... }:
{
imports = [
../profiles/nvim
../profiles/cli
../profiles/direnv
../profiles/git
../profiles/task
../profiles/kitty
../profiles/tmux
# ../profiles/firefox
];
home.username = "anishlakhwara";
home.homeDirectory = "/Users/anishlakhwara";
home.stateVersion = "22.05";
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
'';
# Managing sketchybar plugins from home-manager
home.file = {
".config/sketchybar" = {
source = ./sketchybar;
recursive = true;
};
".config/aerospace" = {
source = ./aerospace;
};
};
}

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
COLOR="$CYAN"
sketchybar --add item battery right \
--set battery \
update_freq=60 \
icon.color="$COLOR" \
icon.padding_left=10 \
label.padding_right=10 \
label.color="$COLOR" \
background.height=26 \
background.corner_radius="$CORNER_RADIUS" \
background.padding_right=5 \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.color="$BAR_COLOR" \
background.drawing=on \
script="$PLUGIN_DIR/power.sh" \
--subscribe battery power_source_change

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
COLOR="$CYAN"
sketchybar --add item battery right \
--set battery \
update_freq=60 \
icon.color="$COLOR" \
icon.padding_left=10 \
label.padding_right=10 \
label.color="$COLOR" \
background.height=26 \
background.corner_radius="$CORNER_RADIUS" \
background.padding_right=5 \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.color="$BAR_COLOR" \
background.drawing=on \
script="$PLUGIN_DIR/power.sh" \
--subscribe battery power_source_change

View file

@ -1,18 +0,0 @@
#!/usr/bin/env bash
COLOR="$BLUE"
sketchybar --add item calendar right \
--set calendar update_freq=15 \
icon.color="$COLOR" \
icon.padding_left=10 \
label.color="$COLOR" \
label.padding_right=10 \
background.height=26 \
background.corner_radius="$CORNER_RADIUS" \
background.padding_right=5 \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.color="$BAR_COLOR" \
background.drawing=on \
script="$PLUGIN_DIR/calendar.sh"

View file

@ -1,21 +0,0 @@
#!/usr/bin/env bash
COLOR="$MAGENTA"
sketchybar --add item clock right \
--set clock update_freq=60 \
icon.padding_left=10 \
icon.color="$COLOR" \
icon=" " \
label.color="$COLOR" \
label.padding_right=5 \
label.width=43 \
align=center \
background.height=26 \
background.corner_radius="$CORNER_RADIUS" \
background.padding_right=2 \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.color="$BAR_COLOR" \
background.drawing=on \
script="$PLUGIN_DIR/clock.sh"

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
COLOR="$YELLOW"
sketchybar --add item cpu right \
--set cpu \
update_freq=3 \
icon.color="$COLOR" \
icon.padding_left=10 \
label.color="$COLOR" \
label.padding_right=10 \
background.height=26 \
background.corner_radius="$CORNER_RADIUS" \
background.padding_right=5 \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.color="$BAR_COLOR" \
background.drawing=on \
script="$PLUGIN_DIR/cpu.sh"

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
COLOR="$WHITE"
sketchybar \
--add item front_app left \
--set front_app script="$PLUGIN_DIR/front_app.sh" \
icon.drawing=off \
background.height=26 \
background.padding_left=0 \
background.padding_right=10 \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.corner_radius="$CORNER_RADIUS" \
background.color="$BAR_COLOR" \
label.color="$COLOR" \
label.padding_left=10 \
label.padding_right=10 \
associated_display=active \
--subscribe front_app front_app_switched

View file

@ -1,44 +0,0 @@
#!/usr/bin/env bash
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10")
sketchybar --add item spacer.1 left \
--set spacer.1 background.drawing=off \
label.drawing=off \
icon.drawing=off \
width=10
for i in {0..9}; do
sid=$((i + 1))
sketchybar --add space space.$sid left \
--set space.$sid associated_space=$sid \
label.drawing=off \
icon.padding_left=10 \
icon.padding_right=10 \
background.padding_left=-5 \
background.padding_right=-5 \
script="$PLUGIN_DIR/space.sh"
done
sketchybar --add item spacer.2 left \
--set spacer.2 background.drawing=off \
label.drawing=off \
icon.drawing=off \
width=5
sketchybar --add bracket spaces '/space.*/' \
--set spaces background.border_width="$BORDER_WIDTH" \
background.border_color="$RED" \
background.corner_radius="$CORNER_RADIUS" \
background.color="$BAR_COLOR" \
background.height=26 \
background.drawing=on
sketchybar --add item separator left \
--set separator icon=\
icon.font="$FONT:Regular:16.0" \
background.padding_left=26 \
background.padding_right=15 \
label.drawing=off \
associated_display=active \
icon.color="$YELLOW"

View file

@ -1,23 +0,0 @@
#!/usr/bin/env bash
COLOR="$ORANGE"
sketchybar --add item spotify q \
--set spotify \
scroll_texts=on \
icon=󰎆 \
icon.color="$COLOR" \
icon.padding_left=10 \
background.color="$BAR_COLOR" \
background.height=26 \
background.corner_radius="$CORNER_RADIUS" \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.padding_right=-5 \
background.drawing=on \
label.padding_right=10 \
label.max_chars=20 \
associated_display=active \
updates=on \
script="$PLUGIN_DIR/spotify.sh" \
--subscribe spotify media_change

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
COLOR="$GREEN"
sketchybar \
--add item sound right \
--set sound \
icon.color="$COLOR" \
icon.padding_left=10 \
label.color="$COLOR" \
label.padding_right=10 \
background.height=26 \
background.corner_radius="$CORNER_RADIUS" \
background.padding_right=5 \
background.border_width="$BORDER_WIDTH" \
background.border_color="$COLOR" \
background.color="$BAR_COLOR" \
background.drawing=on \
script="$PLUGIN_DIR/sound.sh" \
--subscribe sound volume_change

View file

@ -1,4 +0,0 @@
sketchybar -m --add item vpn right \
--set vpn icon=\
update_freq=5 \
script="~/.config/sketchybar/plugins/vpn.sh"

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
sketchybar --set "$NAME" icon="󰸗 " label="$(date '+%a %d. %b')"

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
LABEL=$(date '+%H:%M')
sketchybar --set "$NAME" icon=" " label="$LABEL"

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
sketchybar --set "$NAME" icon="" label="$(ps -A -o %cpu | awk '{s+=$1} END {s /= 8} END {printf "%.1f%%\n", s}')"

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
case "$SENDER" in
"front_app_switched")
sketchybar --set "$NAME" label="$INFO"
;;
esac

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)
CHARGING=$(pmset -g batt | grep 'AC Power')
if [ "$PERCENTAGE" = "" ]; then
exit 0
fi
case ${PERCENTAGE} in
9[0-9] | 100)
ICON=" "
;;
[6-8][0-9])
ICON=" "
;;
[3-5][0-9])
ICON=" "
;;
[1-2][0-9])
ICON=" "
;;
*) ICON=" " ;;
esac
if [ "$CHARGING" != "" ]; then
ICON=""
fi
sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}% "

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
VOLUME=$(osascript -e "output volume of (get volume settings)")
MUTED=$(osascript -e "output muted of (get volume settings)")
if [ "$MUTED" != "false" ]; then
ICON="󰖁 "
VOLUME=0
else
case ${VOLUME} in
100) ICON=" " ;;
[5-9]*) ICON=" " ;;
[0-9]*) ICON=" " ;;
*) ICON=" " ;;
esac
fi
sketchybar -m \
--set "$NAME" icon=$ICON \
--set "$NAME" label="$VOLUME%"

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors
SPACE_ICONS=(" " " " "󰺻 " " " " " "6" "7" "8" "9" "10")
SPACE_CLICK_SCRIPT="yabai -m space --focus $SID 2>/dev/null"
if [ "$SELECTED" = "true" ]; then
sketchybar --animate tanh 5 --set "$NAME" \
icon.color="$RED" \
icon="${SPACE_ICONS[$SID - 1]}" \
click_script="$SPACE_CLICK_SCRIPT"
else
sketchybar --animate tanh 5 --set "$NAME" \
icon.color="$COMMENT" \
icon="${SPACE_ICONS[$SID - 1]}" \
click_script="$SPACE_CLICK_SCRIPT"
fi

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
STATE="$(echo "$INFO" | jq -r '.state')"
APP="$(echo "$INFO" | jq -r '.app')"
if [ "$STATE" = "playing" ] && [ "$APP" == "Spotify" ]; then
MEDIA="$(echo "$INFO" | jq -r '.title + " - " + .artist')"
sketchybar --set "$NAME" label="$MEDIA" drawing=on
else
sketchybar --set "$NAME" drawing=off
fi

View file

@ -1,16 +0,0 @@
#!/bin/bash
### You need to edit sudoers file to run wg-quick without password
# %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick
WG_PIDFILE="/var/run/wireguard/wg0.name"
if [ -f $WG_PIDFILE ]; then
sketchybar -m --set vpn icon=\
label="$VPN" \
drawing=on \
click_script="~/.config/sketchybar/plugins/wg_off.sh"
else
sketchybar -m --set vpn drawing=off click_script="~/.config/sketchybar/plugins/wg_on.sh"
fi

View file

@ -1,5 +0,0 @@
### You need to edit sudoers file to run wg-quick without password
# %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick
sudo wg-quick down wg0

View file

@ -1,5 +0,0 @@
### You need to edit sudoers file to run wg-quick without password
# %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick
sudo wg-quick up wg0

View file

@ -1,50 +0,0 @@
#!/usr/bin/env sh
# Color Palette
# Tokyonight Night
BLACK=0xff24283b
WHITE=0xffa9b1d6
MAGENTA=0xffbb9af7
BLUE=0xff7aa2f7
CYAN=0xff7dcfff
GREEN=0xff9ece6a
YELLOW=0xffe0af68
ORANGE=0xffff9e64
RED=0xfff7768e
BAR_COLOR=0xff1a1b26
COMMENT=0xff565f89
# Tokyonight Day
# BLACK=0xffe9e9ed
# WHITE=0xff3760bf
# MAGENTA=0xff9854f1
# BLUE=0xff2e7de9
# CYAN=0xff007197
# GREEN=0xff587539
# YELLOW=0xff8c6c3e
# ORANGE=0xffb15c00
# RED=0xfff52a65
# BAR_COLOR=0xffe1e2e7
TRANSPARENT=0x00000000
# General bar colors
ICON_COLOR=$WHITE # Color of all icons
LABEL_COLOR=$WHITE # Color of all labels
ITEM_DIR="$HOME/.config/sketchybar/items"
PLUGIN_DIR="$HOME/.config/sketchybar/plugins"
FONT="Iosevka Nerd Font"
PADDINGS=3
POPUP_BORDER_WIDTH=2
POPUP_CORNER_RADIUS=11
POPUP_BACKGROUND_COLOR=$BLACK
POPUP_BORDER_COLOR=$COMMENT
CORNER_RADIUS=15
BORDER_WIDTH=2
SHADOW=on

View file

@ -1,5 +0,0 @@
{ self, pkgs, ... }: {
imports =
[ ../profiles/cli ../profiles/nvim ../profiles/direnv ../profiles/git ];
home.stateVersion = "22.05";
}

View file

@ -11,22 +11,4 @@
../profiles/ssh
../profiles/task
];
# GPG configuration for user session
services.gpg-agent = {
enable = true;
pinentry.package = pkgs.pinentry-rofi; # Use rofi for consistency with desktop theme
enableSshSupport = true;
defaultCacheTtl = 28800; # 8 hours
maxCacheTtl = 86400; # 24 hours
extraConfig = ''
pinentry-program ${pkgs.writeShellScript "pinentry-rofi-themed" ''
exec ${pkgs.pinentry-rofi}/bin/pinentry-rofi -theme ~/.config/rofi/theme/passmenu.rasi "$@"
''}
'';
};
programs.gpg = {
enable = true;
};
}

View file

@ -11,6 +11,7 @@
bottom
gptfdisk
starship
iputils
jq
manix
moreutils
@ -41,6 +42,7 @@
file
lsof
atool
strace
zip
unzip
rsync
@ -51,7 +53,7 @@
less
gdb
xxd
taskwarrior2
taskwarrior
gnupg
syncthing
dijo
@ -59,8 +61,8 @@
fontconfig
pandoc
taskwarrior-tui
python3Packages.howdoi
# vimwiki-cli
zk
(pkgs.writeScriptBin "jq-repl" ''
#!/usr/bin/env bash
@ -90,33 +92,11 @@
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
'')
(pkgs.writeScriptBin "monitor" ''
# hotplug
connect() {
# Turn it on if it was off
xrandr --output HDMI-2 --auto
xrandr --output HDMI-2 --same-as eDP-1
xrandr --output eDP-1 --off
pkill -9 polybar
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
polybar mybar > $XDG_DATA_HOME/polybar.log 2>&1 &
}
disconnect() {
xrandr --output HDMI-2 --off
xrandr --output eDP-1 --auto
}
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
'')
(pkgs.writeScriptBin "big-monitor" ''
connect() {
# Turn it on if it was off
xrandr --output HDMI-2 --auto --primary
# Disable normal display
xrandr --output eDP-1 --off
# Use a nice background
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
# Reload Polybar
~/.config/bspwm/rc.d/polybar
}
disconnect() {
@ -145,10 +125,6 @@
disconnect_keyboard
'')
] ++ lib.optionals pkgs.stdenv.isLinux [
# Linux-only packages
iputils
strace
];
programs.zsh = {
@ -156,7 +132,7 @@
enableCompletion = true;
autosuggestion.enable = false;
initContent = ''
initExtra = ''
bindkey -v
autopair-init
'';
@ -229,7 +205,7 @@
enableZshIntegration = true;
};
services.kdeconnect.enable = pkgs.stdenv.isLinux;
services.kdeconnect.enable = true;
home.shellAliases = {
# quick cd
@ -249,8 +225,8 @@
tree = "ls --tree --icons";
cat = "bat";
unzip = "aunpack";
copy = if pkgs.stdenv.isDarwin then "pbcopy" else "xclip -selection clipboard";
paste = if pkgs.stdenv.isDarwin then "pbpaste" else "xclip -selection clipboard -o";
copy = "xclip -selection clipboard";
paste = "xclip -selection clipboard -o";
rm = "echo USE TRASH, FOOL: trash ";
trash = "trash-put";
make-secret = "< /dev/urandom \\tr -dc _A-Za-z0-9 | head -c \${1:-32};echo;";
@ -301,14 +277,7 @@
nepl = "n repl '<nixpkgs>'";
srch = "ns nixpkgs";
orch = "ns override";
# Impure for bitwig on linux, not sure what it's for in darwin
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
'';
nrb = "cd /tmp; sudo nixos-rebuild switch --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";
ncd = "cd /home/anish/usr/helm";

View file

@ -29,8 +29,8 @@ bspc config presel_feedback_color "#bd93f9"
bspc config split_ratio 0.71
# Extra padding for polybar
bspc config top_padding 34
bspc config bottom_padding 0
bspc config -m primary top_padding 34
bspc config -m primary bottom_padding 0
# Rules
bspc rule -r '*'

View file

@ -22,7 +22,7 @@ in
paper-icon-theme
papirus-icon-theme
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
qt5ct
gtk-engine-murrine
gtk_engines
maim
@ -31,9 +31,8 @@ in
inotify-tools
offpunk
termpdfpy
# libsForQt5.kontact
libsForQt5.kontact
thunderbird
libsecret # For secret-tool to manage keyring
];
# GTK4 color scheme?
@ -74,7 +73,7 @@ in
#gtk4 theme
".config/gtk-4.0/settings.ini".text = ''
[Settings]
gtk-application-prefer-dark-theme=true
gtk-application-prefer-dark-theme=1
'';
# gtk3 theme
".config/gtk-3.0/settings.ini".text = ''

View file

@ -8,9 +8,6 @@ open_url_with default
mouse_map left click ungrabbed mouse_click_url_or_select
confirm_os_window_close 0
enable_audio_bell no
# Ctrl+V for paste
map ctrl+v paste_from_clipboard
mouse_map middle release ungrabbed paste_from_clipboard
-- Allows zen-mode.nvim to increase font size
-- allow_remote_control socket-only
-- listen_on unix:/tmp/kitty

View file

@ -2,35 +2,12 @@
@import "config.rasi"
textbox {
vertical-align: 0.5;
horizontal-align: 0.5;
}
listview {
columns: 9;
lines: 7;
cycle: true;
dynamic: true;
layout: vertical;
flow: horizontal;
reverse: false;
fixed-height: true;
fixed-columns: true;
}
element {
orientation: vertical;
}
element-text {
vertical-align: 0.5;
horizontal-align: 0.5;
font: "FiraCode Nerd Font 24";
columns: 4;
}
textbox-icon {
str: "❇️ ";
str: "🎑";
}
prompt {

View file

@ -16,7 +16,7 @@ super + Return
kitty
ctrl + super + Return
tdrop -n tdrop_kitty --post-create-hook "autohide-tdrop &" -ma -h 60% -w 70% -x 15% -y 32 kitty --class=tdrop_kitty
xst -e bash -c "(tmux ls | grep -qEv 'attached|scratch' && tmux at) || tmux"
super + space
rofi -show drun -modi drun,run -show-icons -theme theme/appmenu.rasi
@ -25,7 +25,7 @@ super + Tab
rofi -show window -show-icons -theme theme/windowmenu.rasi
super + e
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy --hidden-descriptions
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy
super + a
paste

View file

@ -18,7 +18,7 @@
isDefault = true;
name = "anish";
userChrome = (builtins.readFile ./userChrome.css);
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# Find extensions: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
ublock-origin
# wallabagger

View file

@ -8,29 +8,13 @@
/*** NAV BAR ***/
/* Hide urlbar */
#nav-bar {
/* customize this value. */
--navbar-margin: -55px;
margin-top: var(--navbar-margin);
margin-bottom: 0;
z-index: -100;
transition: all 0.3s ease !important;
opacity: 0;
}
#navigator-toolbox:focus-within > #nav-bar,
#navigator-toolbox:hover > #nav-bar
{
margin-top: 0;
margin-bottom: var(--navbar-margin);
z-index: 100;
opacity: 1;
}
#main-window[chromehidden*="toolbar"] {
visibility: collapse;
height: -55px !important;
min-height: -55px !important;
position: relative !important;
z-index: 2 !important;
height: 2px !important;
min-height: 2px !important;
margin-bottom: -2px !important;
opacity: 0 !important;
border: none !important;
}
/* But unfocus it when we invoke it with ctrl+L */
@ -53,11 +37,10 @@
height: 28px !important;
}
/* hides the sidebar header
/* hides the sidebar header */
#sidebar-header {
display: none !important;
}
*/
.tab[selected="true"] {
visibility: collapse;
@ -70,153 +53,73 @@
.tabbrowser-tab[visuallyselected="true"] {
visibility: collapse;
}
/* Credits to https://github.com/MrOtherGuy for hthe following snippet*/
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Show sidebar only when the cursor is over it.
The border controlling sidebar width will be removed so you'll need to modify
these values to change width.
By default the internal layout of sidebar changes when hovered, but this can
be changed by setting pref "userchrome.autohide-sidebar.static-layout.enabled" to true
*/
/* Show sidebar only when the cursor is over it */
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
/* Note: If you want only *some* sidebar to be auto-hidden, then you can use [sidebarcommand] attribute selector.
For example, to only affect Sidebery's sidebar replace all instances of #sidebar-box with
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"].
To find the sidebarcommand value for any other sidebar, open that sidebar and use Browser Toolbox to inspect it.
See: https://firefox-source-docs.mozilla.org/devtools-user/browser_toolbox/index.html
*/
/* The whole thing
:where(#main-window) #browser{
--uc-sidebar-width: 240px;
--uc-sidebar-hover-width: 210px;
}
#main-window[sizemode="fullscreen"] #browser{
--uc-sidebar-width: 1px;
}
#sidebar-box{
--uc-sidebar-width: 44px; /* Only thing I (gale) changed */
--uc-sidebar-hover-width: 210px;
--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
--uc-autohide-transition-duration: 115ms;
--uc-autohide-transition-type: linear;
--browser-area-z-index-sidebar: 3;
position: relative;
min-width: var(--uc-sidebar-width) !important;
width: var(--uc-sidebar-width) !important;
max-width: var(--uc-sidebar-width) !important;
z-index: var(--browser-area-z-index-sidebar,3);
background-color: inherit;
/* This directionality flipper is played so that sidebar "grows" into the right direction */
direction: ltr;
&:is([positionend],[sidebar-positionend]):not(:-moz-locale-dir(rtl)){
direction: rtl;
}
z-index:1;
}
.sidebar-browser-stack{
background: inherit;
}
#main-window[sizemode="fullscreen"] #browser{ --uc-sidebar-width: 1px; }
#sidebar-box[positionend]{ direction: rtl }
#sidebar-box[positionend] > *{ direction: ltr }
#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
#main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; }
#sidebar-splitter{ display: none }
#sidebar-header{
overflow: hidden;
color: var(--chrome-color, inherit) !important;
padding-inline: 0 !important;
}
#sidebar-header{ overflow: hidden; /*color: var(--chrome-color, inherit) !important*/}
#sidebar-header::before,
#sidebar-header::after{
content: "";
display: flex;
padding-left: 8px;
}
#sidebar-header,
#sidebar{
transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important;
min-width: var(--uc-sidebar-width) !important;
will-change: min-width;
direction: ltr;
&:-moz-locale-dir(rtl){
direction: rtl;
}
}
#sidebar-box:hover > #sidebar-header,
#sidebar-box:hover > #sidebar,
#sidebar-box:hover > .sidebar-browser-stack > #sidebar{
min-width: var(--uc-sidebar-hover-width) !important;
transition-delay: 0ms !important;
}
#sidebar-box:hover > #sidebar{ min-width: var(--uc-sidebar-hover-width) !important; transition-delay: 0ms !important }
.sidebar-panel{
background-color: transparent !important;
color: var(--newtab-text-primary-color) !important;
/*background-color: transparent !important;
color: var(--newtab-text-primary-color) !important;*/
}
.sidebar-panel #search-box{
-moz-appearance: none !important;
background-color: rgba(249,249,250,0.1) !important;
/*background-color: rgba(249,249,250,0.1) !important;
color: inherit !important;
*/
}
/* Add sidebar divider and give it background */
#sidebar,
#sidebar-header{
background-color: inherit !important;
/*background-color: inherit !important;*/
border-inline: 1px solid rgb(80,80,80);
border-inline-width: 0px 1px;
}
#sidebar-box:not([positionend],[sidebar-positionend]) > :-moz-locale-dir(rtl),
#sidebar-box:is([positionend],[sidebar-positionend]) > *{
#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
#sidebar-box[positionend] > *{
border-inline-width: 1px 0px;
}
@media -moz-pref("sidebar.revamp") {
#sidebar, #sidebar-header{ border-style: none }
#sidebar-box{ padding: 0 !important; }
}
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel{
inset-inline: auto 0px !important;
}
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel-label{
margin-inline: 0px !important;
border-left-style: solid !important;
}
@media -moz-pref("userchrome.autohide-sidebar.static-layout.enabled"){
#sidebar-box{
min-width: var(--uc-sidebar-width) !important;
contain: size;
box-shadow: var(--content-area-shadow);
}
#sidebar{
min-width: var(--uc-sidebar-hover-width) !important;
}
.sidebar-browser-stack{
overflow: hidden;
width: 100%;
transition: width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay);
direction: ltr;
&:hover{
transition-delay: 0ms;
width: var(--uc-sidebar-hover-width);
}
&:-moz-locale-dir(rtl){
transition-property: transform,width !important;
}
}
#sidebar-box[sidebar-positionend]:hover :is(#sidebar-header,#sidebar):-moz-locale-dir(ltr){
transform: translateX(0);
transition-delay: 0ms !important;
}
#sidebar-box:not([sidebar-positionend]):hover .sidebar-browser-stack:-moz-locale-dir(rtl){
transform: translateX(calc(-1 * var(--uc-sidebar-hover-width) + var(--uc-sidebar-width)));
}
#sidebar-box[sidebar-positionend]:hover > .sidebar-browser-stack:-moz-locale-dir(rtl){
transform: translateX(calc(var(--uc-sidebar-hover-width) - var(--uc-sidebar-width)));
transition-delay: 0ms !important;
}
}
*/
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ inset-inline: auto 0px !important; }
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ margin-inline: 0px !important; border-left-style: solid !important; }

View file

@ -12,10 +12,7 @@
userName = "Anish Lakhwara";
userEmail = "anish+git@lakhwara.com";
delta.enable = true;
signing = {
signByDefault = true;
key = "7FC5DF072EF7B716";
};
# TODO enable signing
ignores = [
"*~"
@ -59,7 +56,6 @@
pull.rebase = false;
push.autoSetupRemote = true;
init.defaultBranch = "main";
"url \"git@github.com:\"" = { insteadOf = "https://github.com/"; };
};
aliases = {
@ -98,8 +94,6 @@
# delete merged branches
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

@ -1,23 +0,0 @@
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

@ -1,25 +0,0 @@
#: 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

@ -1,11 +0,0 @@
{ 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

@ -1,15 +0,0 @@
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

@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ pkgs, ... }:
let
customPlugins = {
vim-zettel = pkgs.vimUtils.buildVimPlugin {
@ -10,17 +10,15 @@ let
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
};
};
amp-nvim = pkgs.vimUtils.buildVimPlugin {
name = "amp-nvim";
lsp-format = pkgs.vimUtils.buildVimPlugin {
name = "lsp-format";
src = pkgs.fetchFromGitHub {
owner = "sourcegraph";
repo = "amp.nvim";
rev = "main";
sha256 = "Sm/SQEIZlnqu/sD+MhZzgGm3bf+HnADOOimZ2Q++MXU=";
owner = "lukas-reineke";
repo = "lsp-format.nvim";
rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff";
sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4=";
};
};
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
name = "lspsaga.nvim";
src = pkgs.fetchFromGitHub {
@ -39,6 +37,24 @@ let
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 {
pname = "which-key.nvim";
version = "2022-05-04";
@ -50,6 +66,16 @@ let
};
meta.homepage = "https://github.com/folke/which-key.nvim/";
};
scnvim = pkgs.vimUtils.buildVimPlugin {
pname = "scnvim";
version = "2022-06-04";
src = pkgs.fetchFromGitHub {
owner = "davidgranstrom";
repo = "scnvim";
rev = "746cc0db820d02a9c36b8f9ba2eac9725fa73107";
sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc=";
};
};
yuck-vim = pkgs.vimUtils.buildVimPlugin {
pname = "yuck.vim";
version = "2021-08-09";
@ -100,25 +126,17 @@ let
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; [
tasklib
pynvim
six
pylsp-mypy
#pyls-isort
#pyls-black
black
isort
# other python packages you want
];
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
@ -150,7 +168,7 @@ in
extraConfig = ''
" so our custom files still get included
" set runtimepath+=/home/anish/.config/nvim/
set runtimepath+=/home/anish/.config/nvim/
set tabstop=2
set showmatch
set shiftwidth=2
@ -187,7 +205,7 @@ in
set nobackup
set nowritebackup
" Better display for messages
set cmdheight=0
set cmdheight=2
" You will have bad experience for diagnostic messages when it's default 4000.
set updatetime=300
" don't give |ins-completion-menu| messages.
@ -196,7 +214,6 @@ in
set signcolumn=yes
" highlight row
set cursorline
set autoread
let mapleader = "\<Space>"
let maplocalleader = ","
@ -211,7 +228,19 @@ in
nmap <leader>rt :retab!<CR>
vmap <leader>rt :retab!<CR>
" Alt+hjkl navigation now handled by Navigator.nvim plugin
" moving splits with vim movements.
:tnoremap <A-h> <C-\><C-N><C-w>h
:tnoremap <A-j> <C-\><C-N><C-w>j
:tnoremap <A-k> <C-\><C-N><C-w>k
:tnoremap <A-l> <C-\><C-N><C-w>l
:inoremap <A-h> <C-\><C-N><C-w>h
:inoremap <A-j> <C-\><C-N><C-w>j
:inoremap <A-k> <C-\><C-N><C-w>k
:inoremap <A-l> <C-\><C-N><C-w>l
:nnoremap <A-h> <leader>h
:nnoremap <A-j> <leader>j
:nnoremap <A-k> <leader>k
:nnoremap <A-l> <leader>l
:nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR>
:inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M")<CR>
:inoremap <F4> <C-R>=strftime("%H:%M")<CR>
@ -233,7 +262,6 @@ in
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
nnoremap <leader>ft <cmd>Telescope tags<cr>
nnoremap <leader>fr <cmd>lua KitaabRecent()<cr>
" exit normal mode in terminal
:tnoremap <C-n> <C-\><C-n>
@ -250,11 +278,11 @@ in
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
" general commands
map <leader>e :Neotree toggle<CR>
map <leader>t :NERDTreeToggle<CR>
map <leader>s :w<CR>
map <leader>q :q<CR>
map <leader>r :RainbowParenthesesToggleAll<CR>
nnoremap <Esc> :noh<CR>
nnoremap <BS> :noh<CR>
map Q <Nop>
nnoremap Y y$
nnoremap <leader>n :vnew<CR>
@ -285,11 +313,11 @@ in
:vmap <leader>sy "*y
:map <leader>sp :r!xclip -o<CR>
" buffer navigation (using built-in commands)
nnoremap <silent> gT :bprevious<CR>
nnoremap <silent> gt :bnext<CR>
nnoremap <silent> gj :buffers<CR>
nnoremap <silent> gq :bdelete<CR>
" barbar
nnoremap <silent> gT :BufferPrevious<CR>
nnoremap <silent> gt :BufferNext<CR>
nnoremap <silent> gj :BufferPick<CR>
nnoremap <silent> gq :BufferClose<CR>
" git
nnoremap <leader>ga :G fetch --all
@ -300,21 +328,16 @@ in
nnoremap <leader>gp :Git! push<CR>
nnoremap <leader>gd :Gdiff<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
"map <leader>cz :VimwikiIndex<CR>:ZettelNew
"map <leader>zs :ZettelSearch<CR>
map <leader>cz :VimwikiIndex<CR>:ZettelNew
map <leader>zs :ZettelSearch<CR>
map <leader>zn :ZettelNew<CR>
"map <leader>zo :ZettelOpen<CR>
"map <leader>zf :Telescope oldfiles only_cwd=true<CR>
"map <leader>wt :VimwikiMakeTomorrowDiaryNote
"map <leader>wd :VimwikiMakeYesterdayDiaryNote
"map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
map <leader>zo :ZettelOpen<CR>
map <leader>zf :Telescope oldfiles only_cwd=true<CR>
map <leader>wt :VimwikiMakeTomorrowDiaryNote
map <leader>wd :VimwikiMakeYesterdayDiaryNote
map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }]
let g:sync_taskwarrior = 0
let g:zettel_format = "%y%m%d-%H%M"
@ -327,10 +350,10 @@ in
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
" lsp commands
nnoremap gd :lua vim.lsp.buf.definition()<CR>
nnoremap gI :lua require('telescope.builtin').lsp_implementation()<CR>
nnoremap gK :lua vim.lsp.buf.signature_help()<CR>
nnoremap gr :lua require('telescope.builtin').lsp_references()<CR>
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
@ -339,28 +362,13 @@ in
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
" lspsaga stuff doesn't work
nnoremap <leader>vd :Lspsaga peek_definition<CR>
nnoremap <leader>cr :Lspsaga rename<CR><CR>
nnoremap K :Lspsaga hover_doc<CR>
nnoremap <leader>ca :Lspsaga code_action<CR>
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
nnoremap <leader>vh :Lspsaga hover_doc<CR>
nnoremap <leader>vca :Lspsaga code_action<CR>
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
nnoremap <leader>vs :Dasht<Space>
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
nnoremap <leader>co :Outline<CR>
" Trouble keybindings
nnoremap <leader>xx :Trouble diagnostics<CR>
nnoremap <leader>xw :Trouble workspace_diagnostics<CR>
nnoremap <leader>xd :Trouble document_diagnostics<CR>
nnoremap <leader>xl :Trouble loclist<CR>
nnoremap <leader>xq :Trouble quickfix<CR>
nnoremap <leader>xr :Trouble lsp_references<CR>
" Yank to system clipboard (y operations only, not d)
nnoremap y "+y
vnoremap y "+y
nnoremap Y "+Y
" Note-taking keybindings
nnoremap <leader>zz :ZkNew { title = vim.fn.input('Title: ') }<CR>
nnoremap <leader>vo :LSoutlineToggle<CR>
" dashboard
let g:dashboard_custom_header = [
@ -419,7 +427,7 @@ in
" lua config
lua <<EOF
local signs = { Error = " ", Warn = " ", Hint = "💡", Info = " " }
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
@ -479,10 +487,7 @@ in
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
require('nvim-autopairs').setup{}
@ -562,109 +567,27 @@ in
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
require("luasnip.loaders.from_vscode").lazy_load()
-- lsp-format removed, using conform.nvim instead
require("nvim-navic").setup {
icons = {
Constant = "π ",
Function = "ƒ "
}
}
-- Setup neo-tree
require("neo-tree").setup {}
-- Setup outline
require("outline").setup {}
-- Setup trouble
require("trouble").setup {}
-- Setup noice for floating command palette and notifications
require("noice").setup({
cmdline = {
enabled = true,
view = "cmdline_popup",
},
messages = {
enabled = true,
},
popupmenu = {
enabled = true,
},
notify = {
enabled = true,
view = "notify",
},
lsp = {
progress = {
enabled = true,
format = "lsp_progress",
format_done = "lsp_progress_done",
throttle = 1000 / 30, -- frequency to update lsp progress message
view = "mini",
},
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
command_palette = true,
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = false,
},
views = {
cmdline_popup = {
border = {
style = "rounded",
padding = { 0, 1 },
},
filter_options = {},
win_options = {
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
},
},
-- null-ls
-- being very janky
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.proselint.with({ filetypes = { "vimwiki", "mail", }, }),
null_ls.builtins.diagnostics.commitlint,
null_ls.builtins.diagnostics.jsonlint,
-- null_ls.builtins.code_actions.statix,
-- null_ls.builtins.diagnostics.clj_kondo,
-- null_ls.builtins.formatting.isort,
-- null_ls.builtins.formatting.black,
},
})
-- Setup barbar (tabline with icons)
require'barbar'.setup {
icons = {
filetype = {
enabled = true,
},
},
}
-- Setup lspconfig
require("lsp-format").setup {}
require("nvim-navic").setup {}
local format = require("lsp-format")
local navic = require("nvim-navic")
-- Setup conform.nvim for formatting
require("conform").setup({
formatters_by_ft = {
javascript = { "prettier", "lsp" },
typescript = { "prettier", "lsp" },
javascriptreact = { "prettier", "lsp" },
typescriptreact = { "prettier", "lsp" },
json = { "prettier", "lsp" },
html = { "prettier", "lsp" },
css = { "prettier", "lsp" },
yaml = { "prettier", "lsp" },
rust = { "lsp" },
go = { "lsp" },
lua = { "lsp" },
nix = { "nixfmt-rfc-style" },
clojure = { "lsp" },
fennel = { "lsp" },
terraform = { "lsp" },
bash = { "shfmt" },
sh = { "shfmt" },
},
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
})
-- lspsaga, code_action lightbulb is annoying
local saga = require('lspsaga')
@ -712,20 +635,21 @@ in
}
}
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'ts_ls', 'lua_ls', 'nil_ls', 'gopls', 'bashls'}
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'lua_ls', 'nil_ls', 'gopls'}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = function(client, bufnr)
format.on_attach(client)
navic.attach(client, bufnr)
end,
capabilities = capabilities,
}
end
-- fennel-ls doesn't support navic
-- fennel-ls doesn't support gps
lspconfig['fennel-ls'].setup {
on_attach = function(client, bufnr)
-- fennel-ls setup without navic
format.on_attach(client)
end,
capabilities = capabilities,
}
@ -778,7 +702,7 @@ in
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_clients()
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
end
@ -804,7 +728,7 @@ in
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
map('t', '<TAB>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
map('t', '<A-i>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
-- Custom functions
function update_date()
@ -841,36 +765,15 @@ in
)
-- auto session
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
require('auto-session').setup {
log_level = 'error',
auto_session_suppress_dirs = {'~/', '/tmp', '/'},
auto_session_enable_last_session = false,
auto_session_root_dir = vim.fn.stdpath('data').."/sessions/",
auto_session_enabled = true,
auto_save_enabled = nil,
auto_restore_enabled = nil,
auto_session_create_enabled = nil,
log_level = 'info',
auto_session_suppress_dirs = {'~/'}
}
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal"
require("which-key").setup{}
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
local scnvim = require 'scnvim'
local map = scnvim.map
@ -897,69 +800,6 @@ in
-- You gotta run :SCNvimGenerateAssets for this first
-- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
-- zk
require("zk").setup()
-- vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts)
-- Open notes.
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
-- Open notes associated with the selected tags.
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
local map = vim.api.nvim_set_keymap
-- Search for the notes matching a given query.
vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
-- Search for the notes matching the current visual selection.
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
map("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
-- Create a new note after asking for its title.
-- This overrides the global `<leader>zn` mapping to create the note in the same directory as the current buffer.
-- map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
-- Create a new note in the same directory as the current buffer, using the current selection for title.
-- map("v", "<leader>znt", ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }<CR>", opts)
-- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.
map("v", "<leader>znc", ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
-- Open notes linking to the current buffer.
map("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
-- Alternative for backlinks using pure LSP and showing the source context.
--map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
-- Open notes linked by the current buffer.
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
-- Preview a linked note.
map("n", "<leader>ck", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
-- Open the code actions for a visual selection.
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
require('zen-mode').setup{
window = {
@ -1010,138 +850,13 @@ in
auto_display = false -- WIP automatic markdown image display, may be prone to breaking
}
-- Setup Navigator.nvim
require('Navigator').setup {
disable_on_zoom = true,
mux = 'auto', -- auto-detect tmux
}
-- Set up Navigator.nvim keybindings
vim.keymap.set({'n', 't'}, '<M-h>', '<CMD>NavigatorLeft<CR>')
vim.keymap.set({'n', 't'}, '<M-j>', '<CMD>NavigatorDown<CR>')
vim.keymap.set({'n', 't'}, '<M-k>', '<CMD>NavigatorUp<CR>')
vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>')
-- Disable Ctrl+V in nvim so Kitty can handle paste
vim.keymap.set({'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true})
-- 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-j>', '<Cmd>resize -2<CR>', {silent = true})
vim.keymap.set('n', '<M-S-k>', '<Cmd>resize +2<CR>', {silent = true})
vim.keymap.set('n', '<M-S-l>', '<Cmd>vertical resize +2<CR>', {silent = true})
-- Kitaab recent files (only date-based files, sorted reverse)
function KitaabRecent()
local pickers = require('telescope.pickers')
local finders = require('telescope.finders')
local conf = require('telescope.config').values
-- Use current working directory
local kitaab_path = vim.fn.getcwd()
-- Get all files (depth 1, exclude directories)
local files = vim.fn.readdir(kitaab_path, function(name)
return vim.fn.isdirectory(kitaab_path .. '/' .. name) == 0
end)
-- Filter to only date-based files (starting with digit)
local date_files = {}
for _, filename in ipairs(files) do
if filename:match('^%d') then
table.insert(date_files, filename)
end
end
-- Sort in reverse (most recent first)
table.sort(date_files, function(a, b) return a > b end)
pickers.new({}, {
prompt_title = 'Kitaab Recent',
finder = finders.new_table({
results = date_files,
entry_maker = function(entry)
return {
value = kitaab_path .. '/' .. entry,
display = entry,
ordinal = entry,
path = kitaab_path .. '/' .. entry,
}
end
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
}):find()
end
-- Setup amp.nvim
require('amp').setup({
auto_start = true,
log_level = "info"
})
-- Amp commands
vim.api.nvim_create_user_command("AmpSend", function(opts)
local message = opts.args
if message == "" then
print("Please provide a message to send")
return
end
local amp_message = require("amp.message")
amp_message.send_message(message)
end, {
nargs = "*",
desc = "Send a message to Amp",
})
vim.api.nvim_create_user_command("AmpSendBuffer", function(opts)
local buf = vim.api.nvim_get_current_buf()
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
local content = table.concat(lines, "\n")
local amp_message = require("amp.message")
amp_message.send_message(content)
end, {
nargs = "?",
desc = "Send current buffer contents to Amp",
})
vim.api.nvim_create_user_command("AmpPromptSelection", function(opts)
local lines = vim.api.nvim_buf_get_lines(0, opts.line1 - 1, opts.line2, false)
local text = table.concat(lines, "\n")
local amp_message = require("amp.message")
amp_message.send_to_prompt(text)
end, {
range = true,
desc = "Add selected text to Amp prompt",
})
vim.api.nvim_create_user_command("AmpPromptRef", function(opts)
local bufname = vim.api.nvim_buf_get_name(0)
if bufname == "" then
print("Current buffer has no filename")
return
end
local relative_path = vim.fn.fnamemodify(bufname, ":.")
local ref = "@" .. relative_path
if opts.line1 ~= opts.line2 then
ref = ref .. "#L" .. opts.line1 .. "-" .. opts.line2
elseif opts.line1 > 1 then
ref = ref .. "#L" .. opts.line1
end
local amp_message = require("amp.message")
amp_message.send_to_prompt(ref)
end, {
range = true,
desc = "Add file reference (with selection) to Amp prompt",
})
EOF
'';
extraPackages = with pkgs // customPlugins; [
# used to compile tree-sitter grammar
python-with-my-packages
nodejs
#nodejs
clojure-lsp
clojure
nil
@ -1151,29 +866,21 @@ in
zls
gopls
gcc
pyright
# nodePackages_latest.pyright
shellcheck
proselint
statix
nodePackages.typescript
nodePackages.typescript-language-server
nodePackages.bash-language-server
luajitPackages.lua-lsp
fennel-ls
nixfmt-rfc-style
shfmt
zk
];
plugins = with pkgs.vimPlugins // customPlugins; [
# ui
lualine-nvim
fzf-vim
neo-tree-nvim
outline-nvim
noice-nvim
nui-nvim
trouble-nvim
nerdtree
neovim-ayu
rainbow_parentheses-vim
vim-surround
@ -1210,10 +917,10 @@ in
taskwiki
vim-zettel
hologram-nvim
zk-nvim
# lsp stuff
# nvim-lint
null-ls-nvim
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
@ -1226,7 +933,7 @@ in
nvim-autopairs
cmp_luasnip
luasnip
conform-nvim
lsp-format
friendly-snippets
lspkind-nvim
@ -1234,7 +941,6 @@ in
vim-fugitive
gitsigns-nvim
fzf-checkout-vim
diffview-nvim
# Clojure stuff
# conjure
@ -1242,27 +948,21 @@ in
vim-sexp-mappings-for-regular-people
fennel-vim
#vim-tidal
# experimental
nvim-luapad
gh-addressed
scnvim
leap-nvim
Navigator-nvim
#scnvim
leap
vim-beancount
# vimtex
# custom
yuck-vim
nvim-parinfer
amp-nvim
# vim-processing
] ++ lib.optionals pkgs.stdenv.isLinux [
# Linux-only plugins
vim-tidal # requires SuperCollider which is Linux-only
];
];
withPython3 = true;
extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ];
extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
vimAlias = true;
};
}

View file

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

View file

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

View file

@ -1,201 +0,0 @@
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

@ -1,4 +0,0 @@
# 💤 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

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

View file

@ -1,60 +0,0 @@
{
"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

@ -1,19 +0,0 @@
{
"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

@ -1,68 +0,0 @@
-- 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

@ -1,21 +0,0 @@
-- 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

@ -1,57 +0,0 @@
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

@ -1,6 +0,0 @@
-- 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

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

View file

@ -1,13 +0,0 @@
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

@ -1,50 +0,0 @@
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

@ -1,193 +0,0 @@
-- 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

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

View file

@ -1,14 +0,0 @@
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

@ -1,15 +0,0 @@
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

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

View file

@ -1,3 +0,0 @@
{
home.file.".tmux.conf".source = ./tmux.conf;
}

View file

@ -1,88 +0,0 @@
set -g base-index 1
setw -g pane-base-index 1
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# Mouse works as expected
set-option -g mouse on
# Enable focus events for vim/neovim autoread
set -g focus-events on
# easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# don't rename windows automatically
set-option -g allow-rename off
# DESIGN TWEAKS
# don't do anything when a 'bell' rings
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
# clock mode
setw -g clock-mode-colour yellow
# copy mode
setw -g mode-style 'fg=black bg=green bold'
# panes
set -g pane-border-style 'fg=green'
set -g pane-active-border-style 'fg=yellow'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'fg=green'
set -g status-left ''
set -g status-left-length 10
set -g status-right-style 'fg=black bg=yellow'
set -g status-right '%Y-%m-%d %H:%M '
set -g status-right-length 50
setw -g window-status-current-style 'fg=black bg=green'
setw -g window-status-current-format ' #I #W #F '
setw -g window-status-style 'fg=green bg=black'
setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F '
setw -g window-status-bell-style 'fg=yellow bg=green bold'
# messages
set -g message-style 'fg=yellow bg=green bold'
# Unbind Ctrl+V so it passes through to Kitty for paste
unbind C-v
# Vim-aware pane navigation with Alt+hjkl
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
# Window navigation with Alt+n/p
bind-key -n M-n next-window
bind-key -n M-p previous-window
# Pane resizing with Alt+Shift+hjkl
bind-key -n M-S-h resize-pane -L 2
bind-key -n M-S-j resize-pane -D 2
bind-key -n M-S-k resize-pane -U 2
bind-key -n M-S-l resize-pane -R 2
# Copy mode setup
bind v copy-mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

View file

@ -66,10 +66,6 @@
address = "192.168.1.240";
prefixLength = 24;
}];
ipv6.addresses = [{
address = "fd7d:587a:4300:1::240";
prefixLength = 64;
}];
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
useDHCP = false;
};
@ -92,6 +88,7 @@
# Enable the OpenSSH daemon.
services.openssh.enable = true;
networking.firewall.allowedTCPPorts = [ 22 ];
sound.enable = false;
programs.gnupg.agent.enable = true;
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;

View file

@ -1,4 +1,5 @@
{ self, pkgs, ... }: {
{ self, pkgs, ... }:
{
imports = [
./configuration.nix
../profiles/core
@ -9,7 +10,7 @@
# ../profiles/monitoring
../profiles/nfs
../profiles/gonic
../profiles/headphones
# ../profiles/headphones # TODO broken on 23.11, see: https://github.com/rembo10/headphones/issues/3320
../profiles/radicale
# ../profiles/seafile # waiting for https://github.com/NixOS/nixpkgs/pull/249523 to be merged
../profiles/syncthing
@ -18,16 +19,13 @@
../profiles/wallabag
../profiles/finance
../profiles/sync/website
../profiles/sync/music
../profiles/grasp
# ../profiles/archivebox
# ../profiles/woodpecker-agent
# ../profiles/jellyfin
../profiles/ulogger-server
../profiles/immich
../profiles/jacket
../profiles/photoprism # Replace with immich
../profiles/gpodder
../profiles/transmission
#../profiles/postgres_upgrade_script
];
@ -35,7 +33,7 @@
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
services.postgresqlBackup = {
enable = true;
databases = [ "wallabag" "immich" "ulogger" ];
databases = [ "wallabag" "photoprism" "ulogger" ];
location = "/var/backup/postgresql";
};
mossnet.backup = {
@ -50,17 +48,28 @@
"/data/books" # calibre-web
# "/home/anish/usr/nonfiction" # syncthing
"/home/anish/usr/finance" # beancount
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
"/mnt/two/photos"
"/mnt/two/music"
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
];
# seafile
};
environment.systemPackages = with pkgs; [ lm_sensors ];
hardware.fancontrol = {
enable = false;
config = '''';
services.transmission = {
enable = true;
settings = {
rpc.bind-address = "0.0.0.0";
download-dir = "/mnt/two/new-music";
};
};
services.nginx.virtualHosts."transmission.mossnet.lan" = {
enableACME = false;
forceSSL = false;
locations."/" = {
extraConfig = ''
proxy_pass http://localhost:9091/;
proxy_set_header X-Forwarded-Host $host;
'';
};
};
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";

View file

@ -34,5 +34,7 @@
# keyMap = "us";
# };
sound.enable = true;
services.libinput.enable = true;
}

View file

@ -1,4 +1,5 @@
{ self, pkgs, ... }: {
{ self, pkgs, ... }:
{
imports = [
./configuration.nix
../users/anish
@ -16,32 +17,23 @@
# ../profiles/mount-mossnet
];
# temporarily allow ssh access for work, to be able to do deploy new services
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.PermitRootLogin = "no";
};
hardware.keyboard.qmk.enable = true;
services.udev.packages = with pkgs; [ via ];
# import profiling tools
programs.systemtap.enable = true;
virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "btrfs";
environment.systemPackages = with pkgs; [ docker-compose via ];
environment.systemPackages = with pkgs; [
docker-compose
];
# Speed up boot by removing dependency on network
systemd = {
targets.network-online.wantedBy =
pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"]
services.NetworkManager-wait-online.wantedBy =
pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
targets.network-online.wantedBy = pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"]
services.NetworkManager-wait-online.wantedBy = pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
};
programs.gnupg.agent.enable = true;
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
fileSystems."/mnt/ftp" = {
device = "192.168.1.240:/home/ftp";
@ -72,15 +64,8 @@
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
networking.firewall = {
allowedTCPPorts = [ 22 4173 3000 ]; # allow ssh and vibekanban
allowedTCPPortRanges = [{
from = 1714;
to = 1764;
}];
allowedUDPPortRanges = [{
from = 1714;
to = 1764;
}];
allowedTCPPortRanges = [{ from = 1714; to = 1764; }];
allowedUDPPortRanges = [{ from = 1714; to = 1764; }];
};
age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age";
@ -96,7 +81,10 @@
mossnet.backup = {
enable = true;
name = "curve";
paths = [ "/home/anish/usr" "/home/anish/.ssh" "/home/anish/.password-store/" ];
paths = [
"/home/anish/usr"
"/home/anish/.ssh"
];
};
# enable adb
@ -105,8 +93,7 @@
#virtualisation.docker.enable = true;
boot.blacklistedKernelModules = [ "qcserial" ];
# Used for packer Capsul
users.users.anish.extraGroups =
[ "adbusers" "wheel" "plugdev" "libvertd" "docker" ];
users.users.anish.extraGroups = [ "adbusers" "wheel" "plugdev" "libvertd" "docker" ];
virtualisation.libvirtd.enable = true;
hardware.keyboard.zsa.enable = true;
services.udev.extraRules = ''

View file

@ -1,44 +0,0 @@
{ ... }:
{
homebrew.enable = true;
homebrew.brews = [
"kind"
"kubectl"
"bazelisk"
"sourcegraph/src-cli/src-cli"
"gh"
# "postgresql@15"
# "redis"
];
homebrew.casks = [
# Development Tools
"homebrew/cask/docker"
# "syncthing"
# "insomnia"
# "tableplus"
# "ngrok"
"postico"
"wireshark"
"1password"
"orbstack"
# "aerospace"
# Communication Tools
# Already installed manually
# "loom"
# "slack"
# "zoom"
# "firefox"
# "1password-cli"
# Utility Tools
# "syncthing"
# Productivity Tools
"raycast"
# AI
# "diffusionbee"
];
}

View file

@ -1,157 +0,0 @@
{ self, pkgs, config, ... }:
{
imports = [
./sketchybar
# ./yabai # Now using aerospace
# ./casks
# ../../modules/darwin/home-manager.nix
# ../../modules/shared
# ../../modules/shared/cachix
];
environment.systemPackages = [
pkgs.go
pkgs.python3
pkgs.cargo
pkgs.k9s
pkgs.kubernetes-helm
pkgs.shellcheck
];
age.identityPaths = [ "/Users/anishlakhwara/.ssh/id_ed25519" ];
age.secrets.work-wg.file = "${self}/secrets/work-wg.age";
age.secrets.work-wg.owner = "anishlakhwara";
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.0.69.7/24" ];
listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
privateKeyFile = config.age.secrets.work-wg.path;
dns = [ "10.0.69.4" ];
postDown = ''
sudo /usr/sbin/networksetup -setdnsservers Wi-Fi "Empty"
'';
peers = [
# For a client configuration, one peer entry for the server will suffice.
{
publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI=";
allowedIPs = [ "10.0.69.0/24" ];
# Set this to the server IP and port.
endpoint = "sealight.xyz:60990"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
persistentKeepalive = 25;
}
];
};
};
# Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true; # removed in newer nix-darwin
nixpkgs.hostPlatform = "aarch64-darwin";
programs.zsh.enable = true;
# Setup user, packages, programs
nix = {
# package = pkgs.nixUnstable;
settings.trusted-users = [ "@admin" "anishlakhwara" ];
gc = {
# user = "root"; # removed in newer nix-darwin
automatic = true;
interval = { Weekday = 0; Hour = 2; Minute = 0; };
options = "--delete-older-than 30d";
};
# Turn this on to make command line easier
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# Turn off NIX_PATH warnings now that we're using flakes
system.checks.verifyNixPath = false;
# Load configuration that is shared across systems
# environment.systemPackages = with pkgs; [
#
# ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
# Enable fonts dir
# fonts.fontDir.enable = true;
fonts.packages = with pkgs; [
fira-code
fira-code-symbols
hermit
#hack
siji
font-awesome
proggyfonts
nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
nerd-fonts.iosevka
];
system = {
stateVersion = 4;
primaryUser = "anishlakhwara"; # required for newer nix-darwin
keyboard = {
enableKeyMapping = true;
};
defaults = {
LaunchServices = {
LSQuarantine = false;
};
NSGlobalDomain = {
AppleShowAllExtensions = true;
ApplePressAndHoldEnabled = false;
# 120, 90, 60, 30, 12, 6, 2
KeyRepeat = 2;
# 120, 94, 68, 35, 25, 15
InitialKeyRepeat = 15;
"com.apple.mouse.tapBehavior" = 1;
"com.apple.sound.beep.volume" = 0.0;
"com.apple.sound.beep.feedback" = 0;
};
loginwindow = {
# disable guest account
GuestEnabled = false;
# show name instead of username
SHOWFULLNAME = false;
};
dock = {
autohide = true;
autohide-delay = 0.0;
autohide-time-modifier = 1.0;
static-only = false;
showhidden = false;
show-recents = false;
launchanim = true;
mouse-over-hilite-stack = true;
orientation = "bottom";
tilesize = 48;
mru-spaces = false;
};
finder = {
_FXShowPosixPathInTitle = false;
};
trackpad = {
Clicking = false;
TrackpadThreeFingerDrag = true;
};
};
# keyboard = {
# enableKeyMapping = true;
# remapCapsLockToControl = true;
# };
};
}

View file

@ -1,10 +0,0 @@
{ pkgs, ... }:
{
services.sketchybar = {
enable = true;
config = (builtins.readFile ./sketchybarrc);
extraPackages = [ pkgs.jq ];
};
}

View file

@ -1,59 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors
# General bar and defaults
# parts I didn't want
# y_offset=5 \
# margin=5 \
sketchybar --bar height=35 \
color="$BAR_COLOR" \
shadow="$SHADOW" \
position=top \
sticky=on \
padding_right=0 \
padding_left=3 \
corner_radius="$CORNER_RADIUS" \
blur_radius=20 \
notch_width=200 \
--default updates=when_shown \
icon.font="$FONT:Bold:13.5" \
icon.color="$ICON_COLOR" \
icon.padding_left="$PADDINGS" \
icon.padding_right="$PADDINGS" \
label.font="$FONT:Bold:13.0" \
label.color="$LABEL_COLOR" \
label.padding_left="$PADDINGS" \
label.padding_right="$PADDINGS" \
background.padding_right="$PADDINGS" \
background.padding_left="$PADDINGS" \
popup.background.border_width=1 \
popup.background.corner_radius=11 \
popup.background.border_color="$POPUP_BORDER_COLOR" \
popup.background.color="$POPUP_BACKGROUND_COLOR" \
popup.background.shadow.drawing="$SHADOW"
# Left
# source "$ITEM_DIR/apple.sh"
source "$ITEM_DIR/spaces.sh"
# Center (of notch)
# source "$ITEM_DIR/spotify.sh"
source "$ITEM_DIR/front_app.sh"
# Right
source "$ITEM_DIR/clock.sh"
source "$ITEM_DIR/calendar.sh"
source "$ITEM_DIR/battery.sh"
source "$ITEM_DIR/volume.sh"
source "$ITEM_DIR/cpu.sh"
source "$ITEM_DIR/vpn.sh"
#################### Finalizing Setup ####################
# sketchybar --hotload true
sketchybar --update
echo "sketchybar configuration loaded.."

View file

@ -1,102 +0,0 @@
{pkgs, ... }:
{
services.yabai = {
enable = true;
config = {
mouse_follows_focus = "off";
focus_follows_mouse = "off";
window_placement = "second_child";
window_topmost = "off";
window_opacity = "off";
window_opacity_duration = 0.0;
window_shadow = "on";
window_border = "off";
window_border_placement = "inset";
window_border_width = 4;
window_border_radius = -1.0;
active_window_border_topmost = "off";
active_window_border_color = "0xff775759";
normal_window_border_color = "0xff505050";
insert_window_border_color = "0xffd75f5f";
active_window_opacity = 1.0;
normal_window_opacity = 0.9;
split_ratio = 0.73;
auto_balance = "on";
mouse_modifier = "fn";
mouse_action1 = "move";
mouse_action2 = "resize";
layout = "bsp";
top_padding = 5;
bottom_padding = 5;
left_padding = 5;
right_padding = 5;
window_gap = 5;
};
extraConfig = ''
# Do not manage windows with certain titles eg. Copying files or moving to bin
yabai -m rule --add title="(Copy|Bin|About This Mac|Info)" manage=off
# Do not manage some apps which are not resizable
yabai -m rule --add app="^(Calculator|System Preferences|[sS]tats|[Jj]et[Bb]rains [Tt]ool[Bb]ox|kftray)$" manage=off
'';
};
system.activationScripts.yabai = {
enable = true;
text = ''
yabai --install-service && yabai --start-service
'';
};
services.skhd = {
enable = true;
skhdConfig = ''
# Open iTerm2
cmd - enter : kitty --single-instance -d ~
##################
# Window Motions #
##################
# Rotate
lalt - r : yabai -m space --rotate 90
# Mirror verticaly
lalt - x : yabai -m space --mirror y-axis
# Mirror horizontaly
lalt - y : yabai -m space --mirror x-axis
# yes, i know i swapped x and y, but I mainly use y-axis and y is further...
# Fullscreen
cmd - f : yabai -m window --toggle zoom-fullscreen
# Swap
lalt - q : yabai -m window --swap west
lalt - s : yabai -m window --swap south
lalt - z : yabai -m window --swap north
lalt - d : yabai -m window --swap east
# Warp
shift + lalt - q : yabai -m window --warp west
shift + lalt - s : yabai -m window --warp south
shift + lalt - z : yabai -m window --warp north
shift + lalt - d : yabai -m window --warp east
#########
# Focus #
#########
# Clockwise
# alt - tab : yabai -m window --focus "$(yabai -m query --windows --space | jq -re "[sort_by(.id, .frame) | .[] | select(.role == \"AXWindow\" and .subrole == \"AXStandardWindow\") | .id] | nth(index($(yabai -m query --windows --window | jq -re ".id")) - 1)")"
# Counter-clockwise
# shift - tab : yabai -m window --focus "$(yabai -m query --windows --space | jq -re "[sort_by(.id, .frame) | reverse | .[] | select(.role == \"AXWindow\" and .subrole == \"AXStandardWindow\") | .id] | nth(index($(yabai -m query --windows --window | jq -re ".id")) - 1)")"
##########
# Spaces #
##########
ctrl - left : yabai -m space --focus prev
ctrl - right : yabai -m space --focus next
ctrl + shift - right : yabai -m window --space next; yabai -m space --focus next
ctrl + shift - left : yabai -m window --space prev; yabai -m space --focus prev
cmd - 1 : yabai -m window --space 1; yabai -m space --focus 1
cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2
cmd - 3 : yabai -m window --space 3; yabai -m space --focus 3
cmd - 4 : yabai -m window --space 4; yabai -m space --focus 4
cmd - 5 : yabai -m window --space 5; yabai -m space --focus 5
'';
};
}

View file

@ -1,120 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "deck"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
# time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# i18n.extraLocaleSettings = {
# LC_ADDRESS = "en_US.UTF-8";
# LC_IDENTIFICATION = "en_US.UTF-8";
# LC_MEASUREMENT = "en_US.UTF-8";
# LC_MONETARY = "en_US.UTF-8";
# LC_NAME = "en_US.UTF-8";
# LC_NUMERIC = "en_US.UTF-8";
# LC_PAPER = "en_US.UTF-8";
# LC_TELEPHONE = "en_US.UTF-8";
# LC_TIME = "en_US.UTF-8";
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
# services.xserver.xkb = {
# layout = "us";
# variant = "";
# };
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
# users.users.anish = {
# isNormalUser = true;
# extraGroups = [ "networkmanager" "wheel" ];
# packages = with pkgs; [
# # thunderbird
# ];
# };
# Enable automatic login for the user.
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "anish";
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
# Install firefox.
# programs.firefox.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -1,51 +0,0 @@
{ self, pkgs, config, ... }:
{
imports = [
./configuration.nix
../users/anish
../profiles/core
# ../profiles/bluetooth
# ../profiles/music
../profiles/sync/cal
../profiles/wifi
../profiles/desktop
../profiles/mimetypes
../profiles/syncthing
../profiles/mossnet-hosts
# ../profiles/fly-wg
# ../profiles/mount-mossnet
];
# age.secrets.deck-wg.file = "${self}/secrets/deck-wg.age";
# age.secrets.deck-wg.owner = "deck";
# mossnet.wg = {
# enable = true;
# ips = [ "10.0.69.6/24" ];
# privateKeyFile = "/run/agenix/deck-wg";
# };
users.users.anish.extraGroups = [ "adbusers" "wheel" "plugdev" "libvertd" ];
# boot.plymouth = {
# enable = true;
# themePackages = [ pkgs.plymouth-themes ];
# theme = "motion";
# };
jovian.steam.enable = true;
jovian.devices.steamdeck.enable = true;
jovian.steam.user = "anish";
jovian.steam.autoStart = true;
jovian.steam.desktopSession = "gnome";
# jovian.steam.desktopSession = "none+bspwm";
# Install XR drivers
# environment.systemPackages = with pkgs; [
# xrlinuxdriver
# breezy-gnome
# ];
# services.udev.packages = with pkgs; [
# xrlinuxdriver
# ];
}

View file

@ -1,40 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d432dae0-3512-4891-9582-56d7ecd8524c";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5B4C-7406";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/f75a730e-c849-4edd-a17f-52492d4260dc"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

15
hosts/droid/default.nix Normal file
View file

@ -0,0 +1,15 @@
{ pkgs, ... }:
{
imports = [
# ../profiles/core
];
environment.packages = with pkgs; [
openssh
];
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
system.stateVersion = "24.05";
}

View file

@ -21,6 +21,7 @@
# Enable the OpenSSH daemon.
services.openssh.enable = true;
sound.enable = false;
# Define a user account. Don't forget to set a password with passwd.
# This value determines the NixOS release with which your system is to be

View file

@ -30,22 +30,6 @@
privateKeyFile = "/run/agenix/helix-wg";
};
# Reverse proxy for immich
# services.nginx.virtualHosts."photos.sealight.xyz" = {
# enableACME = true;
# forceSSL = true;
# locations."/" = {
# extraConfig = ''
# proxy_pass http://10.0.69.4:8567;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# '';
# };
# };
services.postgresql.package = pkgs.postgresql_15;
services.postgresqlBackup = {
# TODO needs working wireguard to box

View file

@ -19,6 +19,8 @@
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
sound.enable = false;
# Define a user account. Don't forget to set a password with passwd.
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database

View file

@ -32,9 +32,7 @@ in
};
environment.systemPackages = with pkgs; [
pinentry-rofi
pinentry-gnome3
pinentry-gtk2
cached-nix-shell
];

View file

@ -1,8 +1,8 @@
{ self, config, pkgs, lib, ... }:
let
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-basic dvisvgm dvipng # for preview and export as html
inherit (pkgs.texlive) scheme-basic
dvisvgm dvipng# for preview and export as html
wrapfig amsmath ulem hyperref capt-of;
#(setq org-latex-compiler "lualatex")
#(setq org-preview-latex-default-process 'dvisvgm)
@ -13,9 +13,13 @@ let
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
};
in {
in
{
# TODO modularize
imports = [ ./battery-low-timer.nix ./cal-alarms.nix ];
imports = [
./battery-low-timer.nix
./cal-alarms.nix
];
# Secrets used by home-manager modules
age.secrets.fastmail.file = "${self}/secrets/fastmail.age";
@ -25,8 +29,7 @@ in {
age.secrets.mossnet.owner = "anish";
# Taskwarrior private key
age.secrets.taskwarrior-private.file =
"${self}/secrets/taskwarrior-private.age";
age.secrets.taskwarrior-private.file = "${self}/secrets/taskwarrior-private.age";
age.secrets.taskwarrior-private.owner = "anish";
# We don't plug USBs into servers
@ -38,7 +41,7 @@ in {
dbus = {
enable = true;
packages = [ pkgs.dconf pkgs.gcr ];
packages = [ pkgs.dconf ];
};
};
programs.dconf.enable = true;
@ -53,21 +56,20 @@ in {
XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
PATH = [ "\${XDG_BIN_HOME}" ];
PATH = [
"\${XDG_BIN_HOME}"
];
};
environment.systemPackages = with pkgs; [
#unstable.sublime-music
# olm-3.2.16 is now insecure
# some reason I can't set insecure packages that will be respected
nheko
unstable.nheko
unstable.signal-desktop
unstable.tuba
unstable.newsflash
unstable.liferea
unstable.gh
unstable.flyctl
unstable.sublime-music
kooha
light
@ -98,7 +100,6 @@ in {
# tic-80
ytfzf
yt-dlp
# autohide-tdrop
];
xdg.portal = {
@ -147,11 +148,11 @@ in {
#define bwht #CBCCC6
#define bg blk
#define fg wht
*.foreground: fg
*.background: bg
*.cursorColor: mag
*.color0: blk
*.color8: bblk
*.color1: red
@ -168,7 +169,7 @@ in {
*.color14: bcyn
*.color7: wht
*.color15: bwht
! greys
*.color234: #1E2029
*.color235: #282a36
@ -221,8 +222,6 @@ in {
siji
font-awesome
proggyfonts
nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
nerd-fonts.iosevka
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; })
];
}

View file

@ -3,12 +3,13 @@ let
adblockLocalZones = pkgs.stdenv.mkDerivation {
name = "unbound-zones-adblock";
src = (pkgs.fetchFromGitHub {
owner = "StevenBlack";
repo = "hosts";
rev = "3.12.21";
sha256 = "Yzr6PY/zqQE+AHH0J6ioHTsgkikM+dz4aelbGpQJa1s=";
} + "/hosts");
src = (pkgs.fetchFromGitHub
{
owner = "StevenBlack";
repo = "hosts";
rev = "3.12.21";
sha256 = "Yzr6PY/zqQE+AHH0J6ioHTsgkikM+dz4aelbGpQJa1s=";
} + "/hosts");
phases = [ "installPhase" ];
@ -18,7 +19,7 @@ let
};
mossnet = "192.168.1.240"; # The local lan-ip for box
wg-mossnet = "10.0.69.4"; # The wireguard ip for box
wg-mossnet = "10.0.69.4"; # The wireguard ip for box
mossnet-hosts = [
"mossnet.lan"
"headphones.mossnet.lan"
@ -39,10 +40,10 @@ let
"grasp.mossnet.lan"
"photos.mossnet.lan"
"pod.mossnet.lan"
"mast.mossnet.lan"
];
in {
in
{
services.unbound = {
enable = true;
settings = {
@ -53,9 +54,8 @@ in {
# private-address = "192.168.1.0/24";
cache-min-ttl = 0;
serve-expired = "yes";
interface = [ "0.0.0.0" "::" ];
access-control =
[ "127.0.0.0/8 allow" "192.168.1.0/24 allow" "10.0.69.0/24 allow" "::1 allow" "fd7d:587a:4300:1::/64 allow" ];
interface = [ "0.0.0.0" ];
access-control = [ "127.0.0.0/8 allow" "192.168.1.0/24 allow" "10.0.69.0/24 allow" ];
access-control-view = "10.0.69.0/24 wireguard";
# so-reuseport = "yes";
tls-upstream = "yes";
@ -65,10 +65,7 @@ in {
};
forward-zone = [{
name = ".";
forward-addr = [
"45.90.28.0#6939b9.dns.nextdns.io"
"1.1.1.1@853#cloudflare-dns.com"
];
forward-addr = [ "45.90.28.0#6939b9.dns.nextdns.io" "1.1.1.1@853#cloudflare-dns.com" ];
# non-tls
# forward-addr = ["45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8"]
}];

View file

@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = [ pkgs.ffmpeg ];
mossnet.gonic.enable = true;
mossnet.gonic.settings = ''
music-path /mnt/two/music/

View file

@ -4,6 +4,7 @@
enable = true;
host = "0.0.0.0";
port = 8181;
package = "${pkgs.unstable.headphones}";
user = "headphones";
group = "audio";
dataDir = "/data/music";

View file

@ -1,30 +0,0 @@
{ pkgs, config, ... }:
{
services.immich = {
enable = true;
database = {
enable = true;
};
host = "0.0.0.0";
port = 8567;
mediaLocation = "/mnt/two/photos";
openFirewall = true;
settings.server.externalDomain = "https://photos.sealight.xyz";
};
services.nginx.virtualHosts."photos.mossnet.lan" = {
enableACME = false;
forceSSL = false;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.immich.port}";
proxyWebsockets = true;
recommendedProxySettings = true;
extraConfig = ''
client_max_body_size 50000M;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
'';
};
};
}

View file

@ -1,35 +0,0 @@
{ config, lib, pkgs, ... }:
{
services.jackett = {
enable = true;
port = 8011;
user = "jackett";
group = "transmission";
package = pkgs.unstable.jackett;
};
services.nginx.virtualHosts."jackett.mossnet.lan" = {
enableACME = false;
forceSSL = false;
locations."/" = {
extraConfig = ''
proxy_pass http://127.0.0.1:8011/;
'';
};
};
services.lidarr = {
enable = true;
user = "headphones";
group = "audio";
};
services.nginx.virtualHosts."lidarr.mossnet.lan" = {
enableACME = false;
forceSSL = false;
locations."/" = {
extraConfig = ''
proxy_pass http://127.0.0.1:8686/;
'';
};
};
}

View file

@ -47,9 +47,9 @@
# The registration file is automatically generated after starting the appservice for the first time.
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
# "/var/lib/matrix-synapse/telegram-registration.yaml"
"/var/lib/matrix-synapse/telegram-registration.yaml"
"/var/lib/matrix-synapse/signal-registration.yaml"
#"/var/lib/matrix-as-whatsapp/whatsapp-registration.yaml"
"/var/lib/matrix-as-whatsapp/whatsapp-registration.yaml"
"/var/lib/matrix-as-discord/discord-registration.yaml"
# "/var/lib/matrix-synapse/slack-registration.yaml"
# "/var/lib/matrix-synapse/discord-registration.yaml"

View file

@ -2,51 +2,51 @@
{
# Mautrix-signal settings
# services.signald.enable = true;
# systemd.services.matrix-as-signal = {
# requires = [ "signald.service" ];
# after = [ "signald.service" ];
# unitConfig = {
# JoinsNamespaceOf = "signald.service";
# };
# path = [
# pkgs.ffmpeg # voice messages need `ffmpeg`
# ];
# };
services.signald.enable = true;
systemd.services.matrix-as-signal = {
requires = [ "signald.service" ];
after = [ "signald.service" ];
unitConfig = {
JoinsNamespaceOf = "signald.service";
};
path = [
pkgs.ffmpeg # voice messages need `ffmpeg`
];
};
services.matrix-appservices = {
addRegistrationFiles = false;
homeserverURL = "https://sealight.xyz/";
homeserverDomain = "sealight.xyz";
services = {
# whatsapp = {
# port = 29183;
# format = "mautrix-go";
# package = pkgs.mautrix-whatsapp;
# };
whatsapp = {
port = 29183;
format = "mautrix-go";
package = pkgs.mautrix-whatsapp;
};
discord = {
port = 29188;
format = "mautrix-go";
package = pkgs.mautrix-discord;
package = pkgs.my-mautrix-discord;
};
# signal = {
# port = 29184;
# format = "mautrix-python";
# package = pkgs.mautrix-signal;
# serviceConfig = {
# # StateDirectory = [ "matrix-as-signal" "signald" ];
# # SupplementaryGroups = [ "signald" ];
# TimeoutStopSec = 1; # work around the service ignoring SIGTERM, see https://gitlab.com/coffeetables/nix-matrix-appservices/-/issues/12
# # User = lib.mkForce config.services.signald.user;
# # Group = lib.mkForce config.services.signald.group;
# };
# # settings.signal = {
# # socket_path = config.services.signald.socketPath;
# # outgoing_attachment_dir = "/var/lib/signald/tmp";
# # };
# };
signal = {
port = 29184;
format = "mautrix-python";
package = pkgs.unstable.mautrix-signal;
serviceConfig = {
StateDirectory = [ "matrix-as-signal" "signald" ];
SupplementaryGroups = [ "signald" ];
TimeoutStopSec = 1; # work around the service ignoring SIGTERM, see https://gitlab.com/coffeetables/nix-matrix-appservices/-/issues/12
User = lib.mkForce config.services.signald.user;
Group = lib.mkForce config.services.signald.group;
};
settings.signal = {
socket_path = config.services.signald.socketPath;
outgoing_attachment_dir = "/var/lib/signald/tmp";
};
};
};
};
}

View file

@ -12,7 +12,7 @@
# Plugins
helm
# surge
# distrho
distrho
orca-c
supercollider
dirt
@ -22,17 +22,15 @@
bespokesynth
lsp-plugins
helio-workstation
# projectm # milkdrop visualizer
# i think it's projectm-sdl-cpp now
projectm # milkdrop visualizer
# DAWs
# ardour
# reaper
# renoise
bitwig-studio
];
services.pulseaudio.enable = false;
hardware.pulseaudio.enable = lib.mkForce false;
security.rtkit.enable = false;
services.pipewire = {

View file

@ -5,7 +5,6 @@
package = pkgs.radicale;
settings = {
server.hosts = [ "0.0.0.0:5252" ];
auth.type = "none";
};
};

View file

@ -5,19 +5,16 @@
serviceConfig.Type = "oneshot";
path = [
pkgs.coreutils
pkgs.openssh
pkgs.gawk
pkgs.rsync
pkgs.beets
];
script = builtins.readFile ./get-music.sh;
serviceConfig = {
User = "anish";
};
};
systemd.timers.get-music-sync = {
systemd.timers.get-music-timer = {
wantedBy = [ "timers.target" ];
partOf = [ "get-music-sync.service" ];
timerConfig.OnCalendar = [ "hourly" ];
timerConfig.OnCalendar = [ "daily" ];
};
}

64
hosts/profiles/sync/music/get-music.sh Executable file → Normal file
View file

@ -1,61 +1,9 @@
#!/usr/bin/env bash
rsync -r --ignore-existing --log-file=/data/incoming/download-log hypercube@talos.feralhosting.com:private/transmission/data/* /data/incoming
set -euo pipefail
# you need to set defaults for beets
# if already imported -> Skip
# Auto accept changes
# also install it lmao
#beet import /data/incoming
REMOTE_HOST="aynish@talos.feralhosting.com"
REMOTE_PATH="private/transmission/data/"
LOCAL_PATH="/mnt/two/incoming"
TRACKING_FILE="/mnt/two/incoming/.downloaded_albums"
LOG_FILE="/mnt/two/incoming/download-log"
# Create tracking file if it doesn't exist
touch "$TRACKING_FILE"
# Get list of albums on remote server
echo "$(date): Checking for new albums on seedbox..." >>"$LOG_FILE"
REMOTE_ALBUMS=$(rsync --dry-run --list-only "$REMOTE_HOST:$REMOTE_PATH" | grep '^d' | awk '{$1=$2=$3=$4=""; sub(/^ +/, ""); print}' | grep -v '^\.') || true
if [ -z "$REMOTE_ALBUMS" ]; then
echo "$(date): No albums found on remote server" >>"$LOG_FILE"
exit 0
fi
# Check each album against tracking file
NEW_ALBUMS=""
while IFS= read -r album; do
if [ -n "$album" ] && ! grep -qF "$album" "$TRACKING_FILE"; then
NEW_ALBUMS="$NEW_ALBUMS$album\n"
echo "$(date): Found new album: $album" >>"$LOG_FILE"
fi
done <<<"$REMOTE_ALBUMS"
if [ -z "$NEW_ALBUMS" ]; then
echo "$(date): No new albums to download" >>"$LOG_FILE"
exit 0
fi
# Download new albums only
echo "$(date): Starting download of new albums..." >>"$LOG_FILE"
while IFS= read -r album; do
if [ -n "$album" ]; then
echo "$(date): Downloading $album" >>"$LOG_FILE"
if rsync -r --log-file="$LOG_FILE" "$REMOTE_HOST:$REMOTE_PATH$album/" "$LOCAL_PATH/$album/"; then
echo "$album" >>"$TRACKING_FILE"
echo "$(date): Successfully downloaded $album" >>"$LOG_FILE"
# Import to beets
echo "$(date): Importing $album to beets..." >>"$LOG_FILE"
# Set umask to allow group read/write access
umask 002
if beet -p fetchart import -m -l /home/anish/music.log -q -g "$LOCAL_PATH/$album"; then
echo "$(date): Successfully imported $album to beets" >>"$LOG_FILE"
else
echo "$(date): Failed to import $album to beets" >>"$LOG_FILE"
fi
else
echo "$(date): Failed to download $album" >>"$LOG_FILE"
fi
fi
done <<<"$(echo -e "$NEW_ALBUMS")"
echo "$(date): Music sync completed" >>"$LOG_FILE"

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
beet import -ql "$TR_TORRENT_DIR"

View file

@ -1,33 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.beets ];
services.transmission = {
enable = true;
settings = {
rpc-enabled = true;
rpc-bind-address = "0.0.0.0";
rpc-whitelist-enabled = false;
script-torrent-done-enabled = true;
# Normally, I would write this into the homedir with home-manager
# And explictly set the dir to be the output of the home-manager location
script-torrent-done-filename = pkgs.writeShellScript "beet-import.sh" ''
#!/usr/bin/env bash
beet -p fetchart import -l /home/anish/music.log -q -g "$TR_TORRENT_DIR"
'';
rpc-url = "/transmission/rpc/";
download-dir = "/mnt/two/new-music";
};
};
services.nginx.virtualHosts."transmission.mossnet.lan" = {
enableACME = false;
forceSSL = false;
locations."/" = {
extraConfig = ''
proxy_pass http://localhost:9091/;
proxy_set_header X-Forwarded-Host $host;
'';
};
};
}

View file

@ -4,20 +4,17 @@
programs.zsh.enable = true;
users.users.anish = {
description = "Personal user for Anish";
hashedPassword =
"$y$j9T$y3DPt/dWaPE.gRazQqw1w0$1RMH5sl/Nu8kW3ZMywYCPRniHD/jF5qRh0VKrdJ.bV2";
hashedPassword = "$y$j9T$y3DPt/dWaPE.gRazQqw1w0$1RMH5sl/Nu8kW3ZMywYCPRniHD/jF5qRh0VKrdJ.bV2";
shell = pkgs.zsh;
isNormalUser = true;
extraGroups = [ "wheel" "audio" "networkmanager" "video" ];
openssh.authorizedKeys.keys = [
# Curve
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve"
# Line
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDtU2GMYjXj6RGO1+mwM4TDGOo0qrKLTL4Di8+QgDX0p5vUEsnE1PS9wnuqCmSu75U8g0XIAMtvtdYyGk1N+Bx01erAZpT8DLYtIXFCyaiN28PVu5T1D0T+TQ7xgIH1qenXZR2DOQdf6kpvKEfm7+7bWhCo0N/KFMpmReubyzHDQcq/1qQasxTL+YALQFOjwKqsOTBXbHwZ103AEAcQX4ftBFEOfVli4/1aKIK4dNSZYB7J9Htq707YnsEqo9RLAMh0aOTTYgTx9AoSUDeqGuh/AGkcB7NcS7EEtI6d5YUGylwZh/gF6hqE0jl8kn2m5jMKXL3CRohZvjifue8x/GIjpu5WRabUuhBEbrfTQQaC7taHnt5rvYCGzKZx09TexUzhuz2CL480DRoxSG+P+lCNm1dIg/EZrnGEzXCSr36PlOqS5t5gm8tPkzCmZf2wU15A3ZIYUPmnYLqsn4WmIV7rKmdqt2ctWELUXow3PPiZXBucP9P3xpsYEfF1SB2SGNc= u0_a139@localhost"
# Box
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKN8/SH55DBiwVoSnTU8k2Pen+wmovL9QaMyehxGEsJJv/8fzwsswGalD4C/4O51LOvdu4UKkZW5hG02uVSK+58p3UV3pOPyoqsu/aDeIsWsqmTeTzUrBIWOlNzcDKnohLz2oGC5YO+wyTJ9Iteq6aGJDjErsW7sG3h5lXCs551EmJNNGhtBQaaoytMNnWqSdlVjDNCijurH7WUpp40U/RjEp532l4rX6eIIj3jBKEFbhZkFSSjqbj4xM4SyFt+Jmigb1RMjsQjmpfY1vDtM84RcYfpTUte/T5w2dkD5H6kccmWnwKSJpm9wXfx4E7lR9APdUGnau2U1+XxiD3ytGl anish@box"
# Nix-on-droid line
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJOiXBPVvZAp1fY0a0Tupxj0Ml6MoA51lvqt/jAQq249 nix-on-droid@localhost"
# Work
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC/vvh0i6+uAN0GWlK6ZfyTlc/AW54xe2CroUDsDSoGnFKeIUiSsWexobODlVakNhqwCKfsvUh6g+RdA8ZVcamATcYqxysP4X5fRksmAzRm5281O7ZBDHMB2BdcfHSTgiz7JvMRIQYWDlU8Ck6IL4wlN0b2GMUj9t/GeG37us8280rxpRNoIY7M27AJEZ7XNQhctBIVujxctVBgIMYmZiTwziU7ywJv4rNT5OAWvjRXSo1rkxdvx3VESv4y/mp8m7dEupZpIjIFsLs52+UG5LtadulUqtTWg05sCw8LEcmRhflgZSAvjw60RrKFCuWxc8+/Pmaw+zExeBMenqi0NzuTc3S3k2wCKVIZDh/0tlXzIwZ6WRqxDevUtEKfvbEFMXd8akhTfYs0dyszcFRevBxOBPbcKku+FK/HkdPLmEANvxYty3cv+Eipkz3c8JPJPvXNTXrjepXMm0LUKodO3c15hGogCOxUO38kykkyYnn+MxxHparoMfEr2+oHNpQoS5wA1G43ppqjVoRDgnhleu6ixwRkLZzphY3cnOd5jL9Ie5xIGbFWH1qSlQRdHBkHjuf85z7+QK8nFYAhmG1K3Vt3GNtF8LN1tYQkfwBJ/vsroMNzGPoq4PjVbqb80Eq+96cP89XKfU2/xw1g+p2lJDm/zC1WCjXVzf8NRwC7gqPavQ== anishlakhwara@anishs-mbp.lan"
];
};
}

Some files were not shown because too many files have changed in this diff Show more