this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

WIP: Integration branch with darwin and deck support

- Added darwin and jovian inputs
- Added platform-specific package configurations
- Added darwinConfigurations and deck nixosConfiguration
- Copied darwin and deck specific files
- Fixed darwin version compatibility

Some configurations still need debugging

+2114 -164
+17 -6
.direnv/bin/nix-direnv-reload
··· 1 1 #!/usr/bin/env bash 2 - dir="$(realpath $(dirname ${BASH_SOURCE[0]})/../..)" 3 - _nix_direnv_force_reload=1 direnv exec "$dir" true 4 - direnv reload 5 - # direnv reload updates the mtime of .envrc. Also update the timestamp of the 6 - # profile_rc file to keep track that we actually are up to date. 7 - touch $dir/.direnv/{nix,flake}-profile-*.rc 2 + set -e 3 + if [[ ! -d "/home/anish/usr/helm" ]]; then 4 + echo "Cannot find source directory; Did you move it?" 5 + echo "(Looking for "/home/anish/usr/helm")" 6 + echo 'Cannot force reload with this script - use "direnv reload" manually and then try again' 7 + exit 1 8 + fi 9 + 10 + # rebuild the cache forcefully 11 + _nix_direnv_force_reload=1 direnv exec "/home/anish/usr/helm" true 12 + 13 + # Update the mtime for .envrc. 14 + # This will cause direnv to reload again - but without re-building. 15 + touch "/home/anish/usr/helm/.envrc" 8 16 17 + # Also update the timestamp of whatever profile_rc we have. 18 + # This makes sure that we know we are up to date. 19 + touch -r "/home/anish/usr/helm/.envrc" "/home/anish/usr/helm/.direnv"/*.rc
+385 -157
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc
··· 7 7 export AR 8 8 AS='as' 9 9 export AS 10 - BASH='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' 10 + BASH='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash' 11 11 CC='gcc' 12 12 export CC 13 - CONFIG_SHELL='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' 13 + CONFIG_SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash' 14 14 export CONFIG_SHELL 15 15 CXX='g++' 16 16 export CXX 17 17 HOSTTYPE='x86_64' 18 - 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' 18 + 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' 19 19 export HOST_PATH 20 20 IFS=' 21 21 ' ··· 25 25 export LD 26 26 LINENO='76' 27 27 MACHTYPE='x86_64-pc-linux-gnu' 28 - NIX_BINTOOLS='/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40' 28 + NIX_BINTOOLS='/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44' 29 29 export NIX_BINTOOLS 30 30 NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' 31 31 export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu 32 32 NIX_BUILD_CORES='4' 33 33 export NIX_BUILD_CORES 34 - NIX_CC='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0' 34 + NIX_CC='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0' 35 35 export NIX_CC 36 36 NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' 37 37 export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu 38 - 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' 38 + 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' 39 39 export NIX_CFLAGS_COMPILE 40 40 NIX_CONFIG='experimental-features = nix-command flakes' 41 41 export NIX_CONFIG 42 42 NIX_ENFORCE_NO_NATIVE='1' 43 43 export NIX_ENFORCE_NO_NATIVE 44 - NIX_HARDENING_ENABLE='fortify fortify3 stackprotector pic strictoverflow format relro bindnow' 44 + NIX_HARDENING_ENABLE='bindnow format fortify fortify3 pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs' 45 45 export NIX_HARDENING_ENABLE 46 - 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' 46 + 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' 47 47 export NIX_LDFLAGS 48 48 NIX_NO_SELF_RPATH='1' 49 49 NIX_STORE='/nix/store' ··· 58 58 export OLDPWD 59 59 OPTERR='1' 60 60 OSTYPE='linux-gnu' 61 - 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' 61 + 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' 62 62 export PATH 63 63 PS4='+ ' 64 64 RANLIB='ranlib' 65 65 export RANLIB 66 66 READELF='readelf' 67 67 export READELF 68 + SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash' 69 + export SHELL 68 70 SIZE='size' 69 71 export SIZE 70 72 SOURCE_DATE_EPOCH='315532800' ··· 73 75 export STRINGS 74 76 STRIP='strip' 75 77 export STRIP 76 - 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' 78 + 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' 77 79 export XDG_DATA_DIRS 78 80 __structuredAttrs='' 79 81 export __structuredAttrs 82 + _substituteStream_has_warned_replace_deprecation='false' 80 83 buildInputs='' 81 84 export buildInputs 82 85 buildPhase='{ echo "------------------------------------------------------------"; ··· 89 92 } >> "$out" 90 93 ' 91 94 export buildPhase 92 - builder='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' 95 + builder='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash' 93 96 export builder 94 97 cmakeFlags='' 95 98 export cmakeFlags 96 99 configureFlags='' 97 100 export configureFlags 98 101 defaultBuildInputs='' 99 - 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' 102 + 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' 100 103 depsBuildBuild='' 101 104 export depsBuildBuild 102 105 depsBuildBuildPropagated='' ··· 127 130 declare -a envTargetTargetHooks=() 128 131 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' ) 129 132 guess='4' 130 - 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' 133 + 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' 131 134 mesonFlags='' 132 135 export mesonFlags 133 136 name='nix-shell-env' 134 137 export name 135 - 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' 138 + 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' 136 139 export nativeBuildInputs 137 140 out='/home/anish/usr/helm/outputs/out' 138 141 export out ··· 151 154 export patches 152 155 phases='buildPhase' 153 156 export phases 154 - pkg='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0' 157 + pkg='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0' 155 158 declare -a pkgsBuildBuild=() 156 - 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' ) 159 + 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' ) 157 160 declare -a pkgsBuildTarget=() 158 161 declare -a pkgsHostHost=() 159 162 declare -a pkgsHostTarget=() 160 163 declare -a pkgsTargetTarget=() 161 - declare -a postFixupHooks=('_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' ) 164 + declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' ) 162 165 declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) 163 166 declare -a preConfigureHooks=('_multioutConfig' ) 164 167 preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' ··· 173 176 propagatedNativeBuildInputs='' 174 177 export propagatedNativeBuildInputs 175 178 declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) 176 - shell='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash' 179 + shell='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash' 177 180 export shell 178 181 shellHook='' 179 182 export shellHook 180 - stdenv='/nix/store/kv5wkk7xgc8paw9azshzlmxraffqcg0i-stdenv-linux' 183 + stdenv='/nix/store/p2mnji2cdxgf6h27hlqzqf7g8f9bqfsi-stdenv-linux' 181 184 export stdenv 182 185 strictDeps='' 183 186 export strictDeps 184 187 system='x86_64-linux' 185 188 export system 186 189 declare -a unpackCmdHooks=('_defaultUnpack' ) 187 - _accumFlagsArray () 188 - { 189 - 190 - local name; 191 - if [ -n "$__structuredAttrs" ]; then 192 - for name in "$@"; 193 - do 194 - local -n nameref="$name"; 195 - flagsArray+=(${nameref+"${nameref[@]}"}); 196 - done; 197 - else 198 - for name in "$@"; 199 - do 200 - local -n nameref="$name"; 201 - case "$name" in 202 - *Array) 203 - flagsArray+=(${nameref+"${nameref[@]}"}) 204 - ;; 205 - *) 206 - flagsArray+=(${nameref-}) 207 - ;; 208 - esac; 209 - done; 210 - fi 211 - } 212 190 _activatePkgs () 213 191 { 214 192 ··· 274 252 { 275 253 276 254 export system pname name version; 277 - for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); 278 - do 279 - if (( "${NIX_DEBUG:-0}" >= 1 )); then 280 - printf "@%s@ -> %q\n" "${varName}" "${!varName}" 1>&2; 281 - fi; 255 + while IFS='' read -r varName; do 256 + nixTalkativeLog "@${varName}@ -> ${!varName}"; 282 257 args+=("--subst-var" "$varName"); 283 - done 258 + done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }') 284 259 } 285 260 _assignFirst () 286 261 { ··· 316 291 local def="$1"; 317 292 local hookName="$2"; 318 293 if declare -F "$hookName" > /dev/null; then 294 + nixTalkativeLog "calling implicit '$hookName' function hook"; 319 295 "$hookName"; 320 296 else 321 297 if type -p "$hookName" > /dev/null; then 298 + nixTalkativeLog "sourcing implicit '$hookName' script hook"; 322 299 source "$hookName"; 323 300 else 324 301 if [ -n "${!hookName:-}" ]; then 302 + nixTalkativeLog "evaling implicit '$hookName' string hook"; 325 303 eval "${!hookName}"; 326 304 else 327 305 return "$def"; ··· 341 319 echo "Did you specify two \"srcs\" with the same \"name\"?"; 342 320 return 1; 343 321 fi; 344 - cp -pr --reflink=auto -- "$fn" "$destination"; 322 + cp -r --preserve=mode,timestamps --reflink=auto -- "$fn" "$destination"; 345 323 else 346 324 case "$fn" in 347 325 *.tar.xz | *.tar.lzma | *.txz) 348 - xz -d < "$fn" | tar xf - --warning=no-timestamp 326 + ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; 327 + true ) | tar xf - --mode=+w --warning=no-timestamp 349 328 ;; 350 329 *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) 351 - tar xf "$fn" --warning=no-timestamp 330 + tar xf "$fn" --mode=+w --warning=no-timestamp 352 331 ;; 353 332 *) 354 333 return 1 ··· 364 343 local -ra allDirs=(stripAllList stripAllListTarget); 365 344 local -ra stripCmds=(STRIP STRIP_FOR_TARGET); 366 345 local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); 367 - stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin}; 346 + stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks}; 368 347 stripDebugListTarget=${stripDebugListTarget[*]:-}; 369 348 stripAllList=${stripAllList[*]:-}; 370 349 stripAllListTarget=${stripAllListTarget[*]:-}; ··· 392 371 eval "$1"; 393 372 fi 394 373 } 374 + _logHook () 375 + { 376 + 377 + if [[ -z ${NIX_LOG_FD-} ]]; then 378 + return; 379 + fi; 380 + local hookKind="$1"; 381 + local hookExpr="$2"; 382 + shift 2; 383 + if declare -F "$hookExpr" > /dev/null 2>&1; then 384 + nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"; 385 + else 386 + if type -p "$hookExpr" > /dev/null; then 387 + nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"; 388 + else 389 + if [[ "$hookExpr" != "_callImplicitHook"* ]]; then 390 + local exprToOutput; 391 + if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then 392 + exprToOutput="$hookExpr"; 393 + else 394 + local hookExprLine; 395 + while IFS= read -r hookExprLine; do 396 + hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"; 397 + if [[ -n "$hookExprLine" ]]; then 398 + exprToOutput+="$hookExprLine\\n "; 399 + fi; 400 + done <<< "$hookExpr"; 401 + exprToOutput="${exprToOutput%%\\n }"; 402 + fi; 403 + nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"; 404 + fi; 405 + fi; 406 + fi 407 + } 395 408 _makeSymlinksRelative () 396 409 { 397 410 ··· 525 538 shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; 526 539 fi; 527 540 fi; 528 - 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; 541 + 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; 529 542 prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal 530 543 } 531 544 _multioutDevs () ··· 586 599 echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; 587 600 done 588 601 } 602 + _nixLogWithLevel () 603 + { 604 + 605 + [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0; 606 + local logLevel; 607 + case "${1:?}" in 608 + 0) 609 + logLevel=ERROR 610 + ;; 611 + 1) 612 + logLevel=WARN 613 + ;; 614 + 2) 615 + logLevel=NOTICE 616 + ;; 617 + 3) 618 + logLevel=INFO 619 + ;; 620 + 4) 621 + logLevel=TALKATIVE 622 + ;; 623 + 5) 624 + logLevel=CHATTY 625 + ;; 626 + 6) 627 + logLevel=DEBUG 628 + ;; 629 + 7) 630 + logLevel=VOMIT 631 + ;; 632 + *) 633 + echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"; 634 + return 1 635 + ;; 636 + esac; 637 + local callerName="${FUNCNAME[2]}"; 638 + if [[ $callerName == "_callImplicitHook" ]]; then 639 + callerName="${hookName:?}"; 640 + fi; 641 + printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD" 642 + } 589 643 _overrideFirst () 590 644 { 591 645 ··· 616 670 local -r targetOffset="$3"; 617 671 (( hostOffset <= targetOffset )) || exit 1; 618 672 if [ -f "$pkg" ]; then 673 + nixTalkativeLog "sourcing setup hook '$pkg'"; 619 674 source "$pkg"; 620 675 fi; 621 676 if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then ··· 628 683 addToSearchPath _HOST_PATH "$pkg/bin"; 629 684 fi; 630 685 if [[ -f "$pkg/nix-support/setup-hook" ]]; then 686 + nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'"; 631 687 source "$pkg/nix-support/setup-hook"; 632 688 fi 633 689 } ··· 668 724 else 669 725 useArray=false; 670 726 fi; 671 - if declare -p "$1" 2> /dev/null | grep -q '^'; then 672 - type="$(declare -p "$1")"; 673 - if [[ "$type" =~ "declare -A" ]]; then 674 - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; 675 - return 1; 676 - else 677 - if [[ "$type" =~ "declare -a" ]]; then 678 - useArray=true; 679 - else 680 - useArray=false; 681 - fi; 682 - fi; 727 + if type=$(declare -p "$1" 2> /dev/null); then 728 + case "${type#* }" in 729 + -A*) 730 + echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; 731 + return 1 732 + ;; 733 + -a*) 734 + useArray=true 735 + ;; 736 + *) 737 + useArray=false 738 + ;; 739 + esac; 683 740 fi; 684 741 shift; 685 742 if $useArray; then ··· 741 798 echo "no Makefile or custom buildPhase, doing nothing"; 742 799 else 743 800 foundMakefile=1; 744 - local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); 745 - _accumFlagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; 801 + local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); 802 + concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; 746 803 echoCmd 'build flags' "${flagsArray[@]}"; 747 804 make ${makefile:+-f $makefile} "${flagsArray[@]}"; 748 805 unset flagsArray; ··· 772 829 fi; 773 830 if [[ -z "${checkTarget:-}" ]]; then 774 831 if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then 775 - checkTarget=check; 832 + checkTarget="check"; 776 833 else 777 834 if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then 778 - checkTarget=test; 835 + checkTarget="test"; 779 836 fi; 780 837 fi; 781 838 fi; 782 839 if [[ -z "${checkTarget:-}" ]]; then 783 840 echo "no check/test target in ${makefile:-Makefile}, doing nothing"; 784 841 else 785 - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); 786 - _accumFlagsArray makeFlags makeFlagsArray; 787 - if [ -n "$__structuredAttrs" ]; then 788 - flagsArray+=("${checkFlags[@]:-VERBOSE=y}"); 789 - else 790 - flagsArray+=(${checkFlags:-VERBOSE=y}); 791 - fi; 792 - _accumFlagsArray checkFlagsArray; 793 - flagsArray+=(${checkTarget}); 842 + local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); 843 + concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget; 794 844 echoCmd 'check flags' "${flagsArray[@]}"; 795 845 make ${makefile:+-f $makefile} "${flagsArray[@]}"; 796 846 unset flagsArray; ··· 817 867 target="$(readlink -f "$f")"; 818 868 if [ -f "$target".gz ]; then 819 869 ln -sf "$target".gz "$f".gz && rm "$f"; 870 + fi; 871 + done 872 + } 873 + concatStringsSep () 874 + { 875 + 876 + local sep="$1"; 877 + local name="$2"; 878 + local type oldifs; 879 + if type=$(declare -p "$name" 2> /dev/null); then 880 + local -n nameref="$name"; 881 + case "${type#* }" in 882 + -A*) 883 + echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2; 884 + return 1 885 + ;; 886 + -a*) 887 + local IFS="$(printf '\036')" 888 + ;; 889 + *) 890 + local IFS=" " 891 + ;; 892 + esac; 893 + local ifs_separated="${nameref[*]}"; 894 + echo -n "${ifs_separated//"$IFS"/"$sep"}"; 895 + fi 896 + } 897 + concatTo () 898 + { 899 + 900 + local -; 901 + set -o noglob; 902 + local -n targetref="$1"; 903 + shift; 904 + local arg default name type; 905 + for arg in "$@"; 906 + do 907 + IFS="=" read -r name default <<< "$arg"; 908 + local -n nameref="$name"; 909 + if [[ -z "${nameref[*]}" && -n "$default" ]]; then 910 + targetref+=("$default"); 911 + else 912 + if type=$(declare -p "$name" 2> /dev/null); then 913 + case "${type#* }" in 914 + -A*) 915 + echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2; 916 + return 1 917 + ;; 918 + -a*) 919 + targetref+=("${nameref[@]}") 920 + ;; 921 + *) 922 + if [[ "$name" = *"Array" ]]; then 923 + nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"; 924 + targetref+=(${nameref+"${nameref[@]}"}); 925 + else 926 + targetref+=(${nameref-}); 927 + fi 928 + ;; 929 + esac; 930 + fi; 820 931 fi; 821 932 done 822 933 } ··· 853 964 prependToVar configureFlags --disable-static; 854 965 fi; 855 966 fi; 967 + if [ -z "${dontPatchShebangsInConfigure:-}" ]; then 968 + patchShebangs --build "$configureScript"; 969 + fi; 856 970 fi; 857 971 if [ -n "$configureScript" ]; then 858 972 local -a flagsArray; 859 - _accumFlagsArray configureFlags configureFlagsArray; 973 + concatTo flagsArray configureFlags configureFlagsArray; 860 974 echoCmd 'configure flags' "${flagsArray[@]}"; 861 975 $configureScript "${flagsArray[@]}"; 862 976 unset flagsArray; ··· 878 992 879 993 runHook preDist; 880 994 local flagsArray=(); 881 - _accumFlagsArray distFlags distFlagsArray; 882 - flagsArray+=(${distTarget:-dist}); 995 + concatTo flagsArray distFlags distFlagsArray distTarget=dist; 883 996 echo 'dist flags: %q' "${flagsArray[@]}"; 884 997 make ${makefile:+-f $makefile} "${flagsArray[@]}"; 885 998 if [ "${dontCopyDist:-0}" != 1 ]; then ··· 892 1005 { 893 1006 894 1007 if [ "${noDumpEnvVars:-0}" != 1 ]; then 895 - export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars" || true; 1008 + { 1009 + install -m 0600 /dev/null "$NIX_BUILD_TOP/env-vars" && export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars" 1010 + } || true; 896 1011 fi 897 1012 } 898 1013 echoCmd () ··· 941 1056 local var="${!varRef}"; 942 1057 unset -v varVar varRef; 943 1058 local varSlice="$var[*]"; 944 - case "${!varSlice-}" in 1059 + case " ${!varSlice-} " in 945 1060 *" $pkg "*) 946 1061 return 0 947 1062 ;; ··· 1010 1125 for output in $(getAllOutputNames); 1011 1126 do 1012 1127 if [ -e "${!output}" ]; then 1013 - chmod -R u+w "${!output}"; 1128 + chmod -R u+w,u-s,g-s "${!output}"; 1014 1129 fi; 1015 1130 done; 1016 1131 runHook preFixup; ··· 1036 1151 done; 1037 1152 unset -v hook; 1038 1153 fi; 1039 - if [ -n "${propagatedUserEnvPkgs:-}" ]; then 1154 + if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then 1040 1155 mkdir -p "${!outputBin}/nix-support"; 1041 - printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages"; 1156 + printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages"; 1042 1157 fi; 1043 1158 runHook postFixup 1044 1159 } ··· 1095 1210 role_post='_FOR_TARGET' 1096 1211 ;; 1097 1212 *) 1098 - echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2; 1213 + echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2; 1099 1214 return 1 1100 1215 ;; 1101 1216 esac ··· 1124 1239 export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 1125 1240 ;; 1126 1241 *) 1127 - echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2; 1242 + echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2; 1128 1243 return 1 1129 1244 ;; 1130 1245 esac ··· 1139 1254 if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then 1140 1255 echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; 1141 1256 else 1142 - local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); 1143 - _accumFlagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray; 1144 - flagsArray+=(${installCheckTarget:-installcheck}); 1257 + local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); 1258 + concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck; 1145 1259 echoCmd 'installcheck flags' "${flagsArray[@]}"; 1146 1260 make ${makefile:+-f $makefile} "${flagsArray[@]}"; 1147 1261 unset flagsArray; ··· 1163 1277 if [ -n "$prefix" ]; then 1164 1278 mkdir -p "$prefix"; 1165 1279 fi; 1166 - local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); 1167 - _accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray; 1168 - if [ -n "$__structuredAttrs" ]; then 1169 - flagsArray+=("${installTargets[@]:-install}"); 1170 - else 1171 - flagsArray+=(${installTargets:-install}); 1172 - fi; 1280 + local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL"); 1281 + concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install; 1173 1282 echoCmd 'install flags' "${flagsArray[@]}"; 1174 1283 make ${makefile:+-f $makefile} "${flagsArray[@]}"; 1175 1284 unset flagsArray; ··· 1281 1390 done; 1282 1391 done 1283 1392 } 1393 + nixChattyLog () 1394 + { 1395 + 1396 + _nixLogWithLevel 5 "$*" 1397 + } 1398 + nixDebugLog () 1399 + { 1400 + 1401 + _nixLogWithLevel 6 "$*" 1402 + } 1403 + nixErrorLog () 1404 + { 1405 + 1406 + _nixLogWithLevel 0 "$*" 1407 + } 1408 + nixInfoLog () 1409 + { 1410 + 1411 + _nixLogWithLevel 3 "$*" 1412 + } 1413 + nixLog () 1414 + { 1415 + 1416 + [[ -z ${NIX_LOG_FD-} ]] && return 0; 1417 + local callerName="${FUNCNAME[1]}"; 1418 + if [[ $callerName == "_callImplicitHook" ]]; then 1419 + callerName="${hookName:?}"; 1420 + fi; 1421 + printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD" 1422 + } 1423 + nixNoticeLog () 1424 + { 1425 + 1426 + _nixLogWithLevel 2 "$*" 1427 + } 1428 + nixTalkativeLog () 1429 + { 1430 + 1431 + _nixLogWithLevel 4 "$*" 1432 + } 1433 + nixVomitLog () 1434 + { 1435 + 1436 + _nixLogWithLevel 7 "$*" 1437 + } 1438 + nixWarnLog () 1439 + { 1440 + 1441 + _nixLogWithLevel 1 "$*" 1442 + } 1443 + noBrokenSymlinks () 1444 + { 1445 + 1446 + local -r output="${1:?}"; 1447 + local path; 1448 + local pathParent; 1449 + local symlinkTarget; 1450 + local -i numDanglingSymlinks=0; 1451 + local -i numReflexiveSymlinks=0; 1452 + local -i numUnreadableSymlinks=0; 1453 + if [[ ! -e $output ]]; then 1454 + nixWarnLog "skipping non-existent output $output"; 1455 + return 0; 1456 + fi; 1457 + nixInfoLog "running on $output"; 1458 + while IFS= read -r -d '' path; do 1459 + pathParent="$(dirname "$path")"; 1460 + if ! symlinkTarget="$(readlink "$path")"; then 1461 + nixErrorLog "the symlink $path is unreadable"; 1462 + numUnreadableSymlinks+=1; 1463 + continue; 1464 + fi; 1465 + if [[ $symlinkTarget == /* ]]; then 1466 + nixInfoLog "symlink $path points to absolute target $symlinkTarget"; 1467 + else 1468 + nixInfoLog "symlink $path points to relative target $symlinkTarget"; 1469 + symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")"; 1470 + fi; 1471 + if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then 1472 + nixInfoLog "symlink $path points outside the Nix store; ignoring"; 1473 + continue; 1474 + fi; 1475 + if [[ $path == "$symlinkTarget" ]]; then 1476 + nixErrorLog "the symlink $path is reflexive"; 1477 + numReflexiveSymlinks+=1; 1478 + else 1479 + if [[ ! -e $symlinkTarget ]]; then 1480 + nixErrorLog "the symlink $path points to a missing target: $symlinkTarget"; 1481 + numDanglingSymlinks+=1; 1482 + else 1483 + nixDebugLog "the symlink $path is irreflexive and points to a target which exists"; 1484 + fi; 1485 + fi; 1486 + done < <(find "$output" -type l -print0); 1487 + if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then 1488 + nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks"; 1489 + exit 1; 1490 + fi; 1491 + return 0 1492 + } 1493 + noBrokenSymlinksInAllOutputs () 1494 + { 1495 + 1496 + if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then 1497 + for output in $(getAllOutputNames); 1498 + do 1499 + noBrokenSymlinks "${!output}"; 1500 + done; 1501 + fi 1502 + } 1284 1503 patchELF () 1285 1504 { 1286 1505 ··· 1304 1523 1305 1524 runHook prePatch; 1306 1525 local -a patchesArray; 1307 - if [ -n "$__structuredAttrs" ]; then 1308 - patchesArray=(${patches:+"${patches[@]}"}); 1309 - else 1310 - patchesArray=(${patches:-}); 1311 - fi; 1526 + concatTo patchesArray patches; 1527 + local -a flagsArray; 1528 + concatTo flagsArray patchFlags=-p1; 1312 1529 for i in "${patchesArray[@]}"; 1313 1530 do 1314 1531 echo "applying patch $i"; ··· 1327 1544 uncompress="lzma -d" 1328 1545 ;; 1329 1546 esac; 1330 - local -a flagsArray; 1331 - if [ -n "$__structuredAttrs" ]; then 1332 - flagsArray=("${patchFlags[@]:--p1}"); 1333 - else 1334 - flagsArray=(${patchFlags:--p1}); 1335 - fi; 1336 1547 $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; 1337 1548 done; 1338 1549 runHook postPatch ··· 1341 1552 { 1342 1553 1343 1554 local pathName; 1344 - local update; 1555 + local update=false; 1345 1556 while [[ $# -gt 0 ]]; do 1346 1557 case "$1" in 1347 1558 --host) ··· 1384 1595 local f; 1385 1596 while IFS= read -r -d '' f; do 1386 1597 isScript "$f" || continue; 1387 - read -r oldInterpreterLine < "$f"; 1598 + read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; 1388 1599 read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; 1389 1600 if [[ -z "${pathName:-}" ]]; then 1390 1601 if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then ··· 1396 1607 if [[ "$oldPath" == *"/bin/env" ]]; then 1397 1608 if [[ $arg0 == "-S" ]]; then 1398 1609 arg0=${args%% *}; 1399 - args=${args#* }; 1400 - newPath="$(PATH="${!pathName}" command -v "env" || true)"; 1401 - args="-S $(PATH="${!pathName}" command -v "$arg0" || true) $args"; 1610 + [[ "$args" == *" "* ]] && args=${args#* } || args=; 1611 + newPath="$(PATH="${!pathName}" type -P "env" || true)"; 1612 + args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"; 1402 1613 else 1403 1614 if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then 1404 1615 echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; 1405 1616 exit 1; 1406 1617 else 1407 - newPath="$(PATH="${!pathName}" command -v "$arg0" || true)"; 1618 + newPath="$(PATH="${!pathName}" type -P "$arg0" || true)"; 1408 1619 fi; 1409 1620 fi; 1410 1621 else 1411 1622 if [[ -z $oldPath ]]; then 1412 1623 oldPath="/bin/sh"; 1413 1624 fi; 1414 - newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)"; 1625 + newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)"; 1415 1626 args="$arg0 $args"; 1416 1627 fi; 1417 1628 newInterpreterLine="$newPath $args"; ··· 1448 1659 else 1449 1660 useArray=false; 1450 1661 fi; 1451 - if declare -p "$1" 2> /dev/null | grep -q '^'; then 1452 - type="$(declare -p "$1")"; 1453 - if [[ "$type" =~ "declare -A" ]]; then 1454 - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; 1455 - return 1; 1456 - else 1457 - if [[ "$type" =~ "declare -a" ]]; then 1458 - useArray=true; 1459 - else 1460 - useArray=false; 1461 - fi; 1462 - fi; 1662 + if type=$(declare -p "$1" 2> /dev/null); then 1663 + case "${type#* }" in 1664 + -A*) 1665 + echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; 1666 + return 1 1667 + ;; 1668 + -a*) 1669 + useArray=true 1670 + ;; 1671 + *) 1672 + useArray=false 1673 + ;; 1674 + esac; 1463 1675 fi; 1464 1676 shift; 1465 1677 if $useArray; then ··· 1504 1716 local hook; 1505 1717 for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; 1506 1718 do 1719 + _logHook "$hookName" "$hook" "$@"; 1507 1720 _eval "$hook" "$@"; 1508 1721 done; 1509 1722 return 0 ··· 1517 1730 local hook ret=1; 1518 1731 for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; 1519 1732 do 1733 + _logHook "$hookName" "$hook" "$@"; 1520 1734 if _eval "$hook" "$@"; then 1521 1735 ret=0; 1522 1736 break; ··· 1555 1769 if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then 1556 1770 return; 1557 1771 fi; 1558 - if [[ -n $NIX_LOG_FD ]]; then 1559 - echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD"; 1560 - fi; 1561 1772 showPhaseHeader "$curPhase"; 1562 1773 dumpVars; 1563 - local startTime=$(date +"%s"); 1774 + local startTime endTime; 1775 + startTime=$(date +"%s"); 1564 1776 eval "${!curPhase:-$curPhase}"; 1565 - local endTime=$(date +"%s"); 1777 + endTime=$(date +"%s"); 1566 1778 showPhaseFooter "$curPhase" "$startTime" "$endTime"; 1567 1779 if [ "$curPhase" = unpackPhase ]; then 1568 - [ -n "${sourceRoot:-}" ] && chmod +x "${sourceRoot}"; 1569 - cd "${sourceRoot:-.}"; 1780 + [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}"; 1781 + cd -- "${sourceRoot:-.}"; 1570 1782 fi 1571 1783 } 1572 1784 showPhaseFooter () ··· 1589 1801 { 1590 1802 1591 1803 local phase="$1"; 1592 - echo "Running phase: $phase" 1804 + echo "Running phase: $phase"; 1805 + if [[ -z ${NIX_LOG_FD-} ]]; then 1806 + return; 1807 + fi; 1808 + printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD" 1593 1809 } 1594 1810 stripDirs () 1595 1811 { ··· 1621 1837 echo "stripping (with command $cmd and flags $stripFlags) in $paths"; 1622 1838 local striperr; 1623 1839 striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; 1624 - 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=$?; 1840 + 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=$?; 1625 1841 [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); 1626 1842 rm "$striperr"; 1627 1843 find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; ··· 1695 1911 fileNames+=("$arg"); 1696 1912 shift; 1697 1913 done; 1914 + if ! [[ "${#fileNames[@]}" -gt 0 ]]; then 1915 + echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2; 1916 + return 1; 1917 + fi; 1698 1918 for file in "${fileNames[@]}"; 1699 1919 do 1700 1920 substitute "$file" "$file" "$@"; ··· 1707 1927 local description=$2; 1708 1928 shift 2; 1709 1929 while (( "$#" )); do 1930 + local replace_mode="$1"; 1710 1931 case "$1" in 1711 1932 --replace) 1933 + if ! "$_substituteStream_has_warned_replace_deprecation"; then 1934 + echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; 1935 + _substituteStream_has_warned_replace_deprecation=true; 1936 + fi; 1937 + replace_mode='--replace-warn' 1938 + ;& 1939 + --replace-quiet | --replace-warn | --replace-fail) 1712 1940 pattern="$2"; 1713 1941 replacement="$3"; 1714 1942 shift 3; 1715 - local savedvar; 1716 - savedvar="${!var}"; 1717 - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; 1718 - if [ "$pattern" != "$replacement" ]; then 1719 - if [ "${!var}" == "$savedvar" ]; then 1720 - echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" 1>&2; 1943 + if ! [[ "${!var}" == *"$pattern"* ]]; then 1944 + if [ "$replace_mode" == --replace-warn ]; then 1945 + printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; 1946 + else 1947 + if [ "$replace_mode" == --replace-fail ]; then 1948 + printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; 1949 + return 1; 1950 + fi; 1721 1951 fi; 1722 - fi 1952 + fi; 1953 + eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' 1723 1954 ;; 1724 1955 --subst-var) 1725 1956 local varName="$2"; 1726 1957 shift 2; 1727 1958 if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then 1728 - echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; 1959 + echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; 1729 1960 return 1; 1730 1961 fi; 1731 1962 if [ -z ${!varName+x} ]; then 1732 - echo "substituteStream(): ERROR: variable \$$varName is unset" 1>&2; 1963 + echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2; 1733 1964 return 1; 1734 1965 fi; 1735 1966 pattern="@$varName@"; ··· 1743 1974 shift 3 1744 1975 ;; 1745 1976 *) 1746 - echo "substituteStream(): ERROR: Invalid command line argument: $1" 1>&2; 1977 + echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2; 1747 1978 return 1 1748 1979 ;; 1749 1980 esac; ··· 1772 2003 srcs="$src"; 1773 2004 fi; 1774 2005 local -a srcsArray; 1775 - if [ -n "$__structuredAttrs" ]; then 1776 - srcsArray=("${srcs[@]}"); 1777 - else 1778 - srcsArray=($srcs); 1779 - fi; 2006 + concatTo srcsArray srcs; 1780 2007 local dirsBefore=""; 1781 2008 for i in *; 1782 2009 do ··· 1833 2060 for f in $(find . -type f -name "$script"); 1834 2061 do 1835 2062 echo "Updating Autotools / GNU config script to a newer upstream version: $f"; 1836 - cp -f "/nix/store/7lk76vdawbx478qq9lvi3mgf73rvcyhd-gnu-config-2023-09-19/$script" "$f"; 2063 + cp -f "/nix/store/khmqxw6b9q7rgkv6hf3gcqf2igk03z1g-gnu-config-2024-01-01/$script" "$f"; 1837 2064 done; 1838 2065 done 1839 2066 } ··· 1841 2068 { 1842 2069 1843 2070 local path="$1"; 1844 - 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)); 2071 + [[ $path == -* ]] && path="./$path"; 2072 + 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)); 1845 2073 local time="${res[0]//\.[0-9]*/}"; 1846 2074 local newestFile="${res[1]}"; 1847 2075 if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then ··· 1860 2088 export TMPDIR="$NIX_BUILD_TOP" 1861 2089 export TEMP="$NIX_BUILD_TOP" 1862 2090 export TEMPDIR="$NIX_BUILD_TOP" 1863 - eval "$shellHook" 2091 + eval "${shellHook:-}"
+153
flake.lock
··· 48 48 "url": "ssh://gitea@git.sealight.xyz/aynish/basant" 49 49 } 50 50 }, 51 + "brew-src": { 52 + "flake": false, 53 + "locked": { 54 + "lastModified": 1756059815, 55 + "narHash": "sha256-UALOxoXoFIHbwKzcqbqCAqw5cC0MJEehLaWSet5vxfE=", 56 + "owner": "Homebrew", 57 + "repo": "brew", 58 + "rev": "02947ea4edbdef5fcce9ee57fa289547f4d096c9", 59 + "type": "github" 60 + }, 61 + "original": { 62 + "owner": "Homebrew", 63 + "ref": "4.6.7", 64 + "repo": "brew", 65 + "type": "github" 66 + } 67 + }, 51 68 "darwin": { 52 69 "inputs": { 53 70 "nixpkgs": [ ··· 66 83 "original": { 67 84 "owner": "lnl7", 68 85 "ref": "master", 86 + "repo": "nix-darwin", 87 + "type": "github" 88 + } 89 + }, 90 + "darwin_2": { 91 + "inputs": { 92 + "nixpkgs": [ 93 + "nixpkgs" 94 + ] 95 + }, 96 + "locked": { 97 + "lastModified": 1757432263, 98 + "narHash": "sha256-qHn+/0+IOz5cG68BZUwL9BV3EO/e9eNKCjH3+N7wMdI=", 99 + "owner": "LnL7", 100 + "repo": "nix-darwin", 101 + "rev": "1fef4404de4d1596aa5ab2bd68078370e1b9dcdb", 102 + "type": "github" 103 + }, 104 + "original": { 105 + "owner": "LnL7", 106 + "ref": "nix-darwin-25.05", 69 107 "repo": "nix-darwin", 70 108 "type": "github" 71 109 } ··· 284 322 "type": "github" 285 323 } 286 324 }, 325 + "homebrew-bundle": { 326 + "flake": false, 327 + "locked": { 328 + "lastModified": 1745335228, 329 + "narHash": "sha256-TIKR2UgtyUmHLNZp255/vLs+1I10hXe+sciMEbAGFwE=", 330 + "owner": "homebrew", 331 + "repo": "homebrew-bundle", 332 + "rev": "a3265c84b232e13048ecbf6fc18a2eedfadbeb08", 333 + "type": "github" 334 + }, 335 + "original": { 336 + "owner": "homebrew", 337 + "repo": "homebrew-bundle", 338 + "type": "github" 339 + } 340 + }, 341 + "homebrew-cask": { 342 + "flake": false, 343 + "locked": { 344 + "lastModified": 1757707077, 345 + "narHash": "sha256-R3Mt2ofMzc3Qt5NC/c3j8f3Rqb0a7FOAT4duKcul+1I=", 346 + "owner": "homebrew", 347 + "repo": "homebrew-cask", 348 + "rev": "b804675c8a9975cdcdf3996ca3e2d25c5b03e1d2", 349 + "type": "github" 350 + }, 351 + "original": { 352 + "owner": "homebrew", 353 + "repo": "homebrew-cask", 354 + "type": "github" 355 + } 356 + }, 357 + "homebrew-core": { 358 + "flake": false, 359 + "locked": { 360 + "lastModified": 1757711740, 361 + "narHash": "sha256-98COOWpl+mDMKlHytToJ7D/pz7DPBX4nT7C0cs+2v98=", 362 + "owner": "homebrew", 363 + "repo": "homebrew-core", 364 + "rev": "f7aa2e9987ef59cf692d5f8e1364b46d318732d5", 365 + "type": "github" 366 + }, 367 + "original": { 368 + "owner": "homebrew", 369 + "repo": "homebrew-core", 370 + "type": "github" 371 + } 372 + }, 373 + "jovian": { 374 + "inputs": { 375 + "nix-github-actions": "nix-github-actions", 376 + "nixpkgs": [ 377 + "unstable" 378 + ] 379 + }, 380 + "locked": { 381 + "lastModified": 1757230583, 382 + "narHash": "sha256-4uqu7sFPOaVTCogsxaGMgbzZ2vK40GVGMfUmrvK3/LY=", 383 + "owner": "Jovian-Experiments", 384 + "repo": "Jovian-NixOS", 385 + "rev": "fc3960e6c32c9d4f95fff2ef84444284d24d3bea", 386 + "type": "github" 387 + }, 388 + "original": { 389 + "owner": "Jovian-Experiments", 390 + "repo": "Jovian-NixOS", 391 + "type": "github" 392 + } 393 + }, 394 + "nix-github-actions": { 395 + "inputs": { 396 + "nixpkgs": [ 397 + "jovian", 398 + "nixpkgs" 399 + ] 400 + }, 401 + "locked": { 402 + "lastModified": 1729697500, 403 + "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", 404 + "owner": "zhaofengli", 405 + "repo": "nix-github-actions", 406 + "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", 407 + "type": "github" 408 + }, 409 + "original": { 410 + "owner": "zhaofengli", 411 + "ref": "matrix-name", 412 + "repo": "nix-github-actions", 413 + "type": "github" 414 + } 415 + }, 416 + "nix-homebrew": { 417 + "inputs": { 418 + "brew-src": "brew-src" 419 + }, 420 + "locked": { 421 + "lastModified": 1756398546, 422 + "narHash": "sha256-n4GVDLhKu65XFraJuCzap2AaZji4xhPaZMTJ8aQdD3s=", 423 + "owner": "zhaofengli-wip", 424 + "repo": "nix-homebrew", 425 + "rev": "3aa475996cb3bc1ecefa88c99c466e6f0bc17431", 426 + "type": "github" 427 + }, 428 + "original": { 429 + "owner": "zhaofengli-wip", 430 + "repo": "nix-homebrew", 431 + "type": "github" 432 + } 433 + }, 287 434 "nix-matrix-appservices": { 288 435 "inputs": { 289 436 "devshell": "devshell", ··· 408 555 "inputs": { 409 556 "agenix": "agenix", 410 557 "basant": "basant", 558 + "darwin": "darwin_2", 411 559 "deploy-rs": "deploy-rs", 412 560 "disko": "disko", 413 561 "grasp": "grasp", 414 562 "hardware": "hardware", 415 563 "home-manager": "home-manager_2", 564 + "homebrew-bundle": "homebrew-bundle", 565 + "homebrew-cask": "homebrew-cask", 566 + "homebrew-core": "homebrew-core", 567 + "jovian": "jovian", 568 + "nix-homebrew": "nix-homebrew", 416 569 "nix-matrix-appservices": "nix-matrix-appservices", 417 570 "nixos-hardware": "nixos-hardware", 418 571 "nixpkgs": "nixpkgs_2",
+130 -1
flake.nix
··· 38 38 # Matrix 39 39 nix-matrix-appservices.url = "gitlab:coffeetables/nix-matrix-appservices"; 40 40 41 + # Darwin 42 + darwin = { 43 + url = "github:LnL7/nix-darwin/nix-darwin-25.05"; 44 + inputs.nixpkgs.follows = "nixpkgs"; 45 + }; 46 + nix-homebrew = { 47 + url = "github:zhaofengli-wip/nix-homebrew"; 48 + }; 49 + homebrew-bundle = { 50 + url = "github:homebrew/homebrew-bundle"; 51 + flake = false; 52 + }; 53 + homebrew-core = { 54 + url = "github:homebrew/homebrew-core"; 55 + flake = false; 56 + }; 57 + homebrew-cask = { 58 + url = "github:homebrew/homebrew-cask"; 59 + flake = false; 60 + }; 61 + 62 + # Steam Deck / Gaming 63 + jovian = { 64 + url = "github:Jovian-Experiments/Jovian-NixOS"; 65 + inputs.nixpkgs.follows = "unstable"; 66 + }; 67 + 41 68 # Others 42 69 nur.url = "github:nix-community/NUR"; 43 70 rust-overlay = { ··· 57 84 58 85 outputs = { self, nixpkgs, unstable, nixos-hardware, home-manager, deploy-rs 59 86 , agenix, disko, basant, grasp, nix-matrix-appservices, nur, tidalcycles 60 - , rust-overlay, vimwikicli, ... }@inputs: 87 + , rust-overlay, vimwikicli, darwin, nix-homebrew, homebrew-bundle 88 + , homebrew-core, homebrew-cask, jovian, ... }@inputs: 61 89 let 62 90 forAllSystems = nixpkgs.lib.genAttrs [ 63 91 "aarch64-linux" ··· 118 146 tidalcycles.overlays.default # needed for nvim which comes pre-installed lol 119 147 ]; 120 148 }); 149 + 150 + # Package set for Darwin systems 151 + darwinPkgsFor = forAllSystems (system: 152 + import nixpkgs { 153 + inherit system; 154 + config = { 155 + permittedInsecurePackages = [ 156 + "olm-3.2.16" 157 + ]; 158 + allowUnfreePredicate = pkg: 159 + builtins.elem (nixpkgs.lib.getName pkg) [ 160 + "ripcord" 161 + "vcv-rack" 162 + "SunVox" 163 + "renoise" 164 + ]; 165 + }; 166 + overlays = [ 167 + rust-overlay.overlays.default 168 + tidalcycles.overlays.default 169 + agenix.overlays.default 170 + nur.overlay 171 + unstableOverlay 172 + vimwikiOverlay 173 + self.overlays.additions 174 + self.overlays.modifications 175 + ]; 176 + }); 177 + 178 + # Package set for Steam Deck (gaming-focused) 179 + deckPkgsFor = forAllSystems (system: 180 + import unstable { 181 + inherit system; 182 + config = { 183 + permittedInsecurePackages = [ 184 + "olm-3.2.16" 185 + ]; 186 + allowUnfreePredicate = pkg: 187 + builtins.elem (nixpkgs.lib.getName pkg) [ 188 + "ripcord" 189 + "vcv-rack" 190 + "SunVox" 191 + "renoise" 192 + "steam" 193 + "steam-original" 194 + "steam-runtime" 195 + ]; 196 + }; 197 + overlays = [ 198 + rust-overlay.overlays.default 199 + tidalcycles.overlays.default 200 + agenix.overlays.default 201 + nur.overlay 202 + unstableOverlay 203 + vimwikiOverlay 204 + self.overlays.additions 205 + self.overlays.modifications 206 + ]; 207 + }); 121 208 in { 122 209 # Your custom packages 123 210 # Acessible through 'nix build', 'nix shell', etc ··· 221 308 home-manager.useGlobalPkgs = true; 222 309 home-manager.useUserPackages = true; 223 310 home-manager.users.anish = import ./home/dev; 311 + } 312 + ]; 313 + }; 314 + 315 + deck = unstable.lib.nixosSystem rec { 316 + specialArgs = { inherit inputs self; }; 317 + system = "x86_64-linux"; 318 + pkgs = deckPkgsFor.${system}; 319 + modules = [ 320 + ./hosts/deck 321 + jovian.nixosModules.default 322 + self.nixosModules.wireguard 323 + agenix.nixosModules.age 324 + self.nixosModules.backup 325 + home-manager.nixosModules.home-manager 326 + { 327 + nix.registry.nixpkgs.flake = unstable; 328 + home-manager.useGlobalPkgs = true; 329 + home-manager.useUserPackages = true; 330 + home-manager.users.anish = import ./home/gui; 331 + } 332 + ]; 333 + }; 334 + }; 335 + 336 + # Darwin configuration entrypoint 337 + darwinConfigurations = { 338 + "Anishs-MacBook-Pro" = darwin.lib.darwinSystem rec { 339 + system = "aarch64-darwin"; 340 + pkgs = darwinPkgsFor.${system}; 341 + specialArgs = { inherit inputs self; }; 342 + modules = [ 343 + ./hosts/darwin 344 + home-manager.darwinModules.home-manager 345 + agenix.darwinModules.default 346 + { 347 + users.users.anishlakhwara.home = "/Users/anishlakhwara"; 348 + home-manager = { 349 + users.anishlakhwara = import ./home/darwin; 350 + useGlobalPkgs = true; 351 + useUserPackages = true; 352 + }; 224 353 } 225 354 ]; 226 355 };
+28
home/darwin/default.nix
··· 1 + { self, pkgs, ... }: 2 + { 3 + imports = [ 4 + ../profiles/nvim 5 + ../profiles/cli 6 + ../profiles/direnv 7 + ../profiles/git 8 + ../profiles/task 9 + ../profiles/kitty 10 + # ../profiles/firefox 11 + ]; 12 + 13 + home.username = "anishlakhwara"; 14 + home.homeDirectory = "/Users/anishlakhwara"; 15 + home.stateVersion = "22.05"; 16 + 17 + programs.zsh.initExtra = '' 18 + 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 19 + ''; 20 + 21 + # Managing sketchybar plugins from home-manager 22 + home.file = { 23 + ".config/sketchybar" = { 24 + source = ./sketchybar; 25 + recursive = true; 26 + }; 27 + }; 28 + }
+20
home/darwin/sketchybar/battery.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$CYAN" 4 + 5 + sketchybar --add item battery right \ 6 + --set battery \ 7 + update_freq=60 \ 8 + icon.color="$COLOR" \ 9 + icon.padding_left=10 \ 10 + label.padding_right=10 \ 11 + label.color="$COLOR" \ 12 + background.height=26 \ 13 + background.corner_radius="$CORNER_RADIUS" \ 14 + background.padding_right=5 \ 15 + background.border_width="$BORDER_WIDTH" \ 16 + background.border_color="$COLOR" \ 17 + background.color="$BAR_COLOR" \ 18 + background.drawing=on \ 19 + script="$PLUGIN_DIR/power.sh" \ 20 + --subscribe battery power_source_change
+20
home/darwin/sketchybar/items/battery.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$CYAN" 4 + 5 + sketchybar --add item battery right \ 6 + --set battery \ 7 + update_freq=60 \ 8 + icon.color="$COLOR" \ 9 + icon.padding_left=10 \ 10 + label.padding_right=10 \ 11 + label.color="$COLOR" \ 12 + background.height=26 \ 13 + background.corner_radius="$CORNER_RADIUS" \ 14 + background.padding_right=5 \ 15 + background.border_width="$BORDER_WIDTH" \ 16 + background.border_color="$COLOR" \ 17 + background.color="$BAR_COLOR" \ 18 + background.drawing=on \ 19 + script="$PLUGIN_DIR/power.sh" \ 20 + --subscribe battery power_source_change
+18
home/darwin/sketchybar/items/calendar.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$BLUE" 4 + 5 + sketchybar --add item calendar right \ 6 + --set calendar update_freq=15 \ 7 + icon.color="$COLOR" \ 8 + icon.padding_left=10 \ 9 + label.color="$COLOR" \ 10 + label.padding_right=10 \ 11 + background.height=26 \ 12 + background.corner_radius="$CORNER_RADIUS" \ 13 + background.padding_right=5 \ 14 + background.border_width="$BORDER_WIDTH" \ 15 + background.border_color="$COLOR" \ 16 + background.color="$BAR_COLOR" \ 17 + background.drawing=on \ 18 + script="$PLUGIN_DIR/calendar.sh"
+21
home/darwin/sketchybar/items/clock.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$MAGENTA" 4 + 5 + sketchybar --add item clock right \ 6 + --set clock update_freq=60 \ 7 + icon.padding_left=10 \ 8 + icon.color="$COLOR" \ 9 + icon=" " \ 10 + label.color="$COLOR" \ 11 + label.padding_right=5 \ 12 + label.width=43 \ 13 + align=center \ 14 + background.height=26 \ 15 + background.corner_radius="$CORNER_RADIUS" \ 16 + background.padding_right=2 \ 17 + background.border_width="$BORDER_WIDTH" \ 18 + background.border_color="$COLOR" \ 19 + background.color="$BAR_COLOR" \ 20 + background.drawing=on \ 21 + script="$PLUGIN_DIR/clock.sh"
+19
home/darwin/sketchybar/items/cpu.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$YELLOW" 4 + 5 + sketchybar --add item cpu right \ 6 + --set cpu \ 7 + update_freq=3 \ 8 + icon.color="$COLOR" \ 9 + icon.padding_left=10 \ 10 + label.color="$COLOR" \ 11 + label.padding_right=10 \ 12 + background.height=26 \ 13 + background.corner_radius="$CORNER_RADIUS" \ 14 + background.padding_right=5 \ 15 + background.border_width="$BORDER_WIDTH" \ 16 + background.border_color="$COLOR" \ 17 + background.color="$BAR_COLOR" \ 18 + background.drawing=on \ 19 + script="$PLUGIN_DIR/cpu.sh"
+20
home/darwin/sketchybar/items/front_app.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$WHITE" 4 + 5 + sketchybar \ 6 + --add item front_app left \ 7 + --set front_app script="$PLUGIN_DIR/front_app.sh" \ 8 + icon.drawing=off \ 9 + background.height=26 \ 10 + background.padding_left=0 \ 11 + background.padding_right=10 \ 12 + background.border_width="$BORDER_WIDTH" \ 13 + background.border_color="$COLOR" \ 14 + background.corner_radius="$CORNER_RADIUS" \ 15 + background.color="$BAR_COLOR" \ 16 + label.color="$COLOR" \ 17 + label.padding_left=10 \ 18 + label.padding_right=10 \ 19 + associated_display=active \ 20 + --subscribe front_app front_app_switched
+44
home/darwin/sketchybar/items/spaces.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10") 4 + 5 + sketchybar --add item spacer.1 left \ 6 + --set spacer.1 background.drawing=off \ 7 + label.drawing=off \ 8 + icon.drawing=off \ 9 + width=10 10 + 11 + for i in {0..9}; do 12 + sid=$((i + 1)) 13 + sketchybar --add space space.$sid left \ 14 + --set space.$sid associated_space=$sid \ 15 + label.drawing=off \ 16 + icon.padding_left=10 \ 17 + icon.padding_right=10 \ 18 + background.padding_left=-5 \ 19 + background.padding_right=-5 \ 20 + script="$PLUGIN_DIR/space.sh" 21 + done 22 + 23 + sketchybar --add item spacer.2 left \ 24 + --set spacer.2 background.drawing=off \ 25 + label.drawing=off \ 26 + icon.drawing=off \ 27 + width=5 28 + 29 + sketchybar --add bracket spaces '/space.*/' \ 30 + --set spaces background.border_width="$BORDER_WIDTH" \ 31 + background.border_color="$RED" \ 32 + background.corner_radius="$CORNER_RADIUS" \ 33 + background.color="$BAR_COLOR" \ 34 + background.height=26 \ 35 + background.drawing=on 36 + 37 + sketchybar --add item separator left \ 38 + --set separator icon= \ 39 + icon.font="$FONT:Regular:16.0" \ 40 + background.padding_left=26 \ 41 + background.padding_right=15 \ 42 + label.drawing=off \ 43 + associated_display=active \ 44 + icon.color="$YELLOW"
+23
home/darwin/sketchybar/items/spotify.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$ORANGE" 4 + 5 + sketchybar --add item spotify q \ 6 + --set spotify \ 7 + scroll_texts=on \ 8 + icon=󰎆 \ 9 + icon.color="$COLOR" \ 10 + icon.padding_left=10 \ 11 + background.color="$BAR_COLOR" \ 12 + background.height=26 \ 13 + background.corner_radius="$CORNER_RADIUS" \ 14 + background.border_width="$BORDER_WIDTH" \ 15 + background.border_color="$COLOR" \ 16 + background.padding_right=-5 \ 17 + background.drawing=on \ 18 + label.padding_right=10 \ 19 + label.max_chars=20 \ 20 + associated_display=active \ 21 + updates=on \ 22 + script="$PLUGIN_DIR/spotify.sh" \ 23 + --subscribe spotify media_change
+20
home/darwin/sketchybar/items/volume.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + COLOR="$GREEN" 4 + 5 + sketchybar \ 6 + --add item sound right \ 7 + --set sound \ 8 + icon.color="$COLOR" \ 9 + icon.padding_left=10 \ 10 + label.color="$COLOR" \ 11 + label.padding_right=10 \ 12 + background.height=26 \ 13 + background.corner_radius="$CORNER_RADIUS" \ 14 + background.padding_right=5 \ 15 + background.border_width="$BORDER_WIDTH" \ 16 + background.border_color="$COLOR" \ 17 + background.color="$BAR_COLOR" \ 18 + background.drawing=on \ 19 + script="$PLUGIN_DIR/sound.sh" \ 20 + --subscribe sound volume_change
+4
home/darwin/sketchybar/items/vpn.sh
··· 1 + sketchybar -m --add item vpn right \ 2 + --set vpn icon= \ 3 + update_freq=5 \ 4 + script="~/.config/sketchybar/plugins/vpn.sh"
+3
home/darwin/sketchybar/plugins/calendar.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + sketchybar --set "$NAME" icon="󰸗 " label="$(date '+%a %d. %b')"
+4
home/darwin/sketchybar/plugins/clock.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + LABEL=$(date '+%H:%M') 4 + sketchybar --set "$NAME" icon=" " label="$LABEL"
+3
home/darwin/sketchybar/plugins/cpu.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + sketchybar --set "$NAME" icon="" label="$(ps -A -o %cpu | awk '{s+=$1} END {s /= 8} END {printf "%.1f%%\n", s}')"
+7
home/darwin/sketchybar/plugins/front_app.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + case "$SENDER" in 4 + "front_app_switched") 5 + sketchybar --set "$NAME" label="$INFO" 6 + ;; 7 + esac
+30
home/darwin/sketchybar/plugins/power.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1) 4 + CHARGING=$(pmset -g batt | grep 'AC Power') 5 + 6 + if [ "$PERCENTAGE" = "" ]; then 7 + exit 0 8 + fi 9 + 10 + case ${PERCENTAGE} in 11 + 9[0-9] | 100) 12 + ICON=" " 13 + ;; 14 + [6-8][0-9]) 15 + ICON=" " 16 + ;; 17 + [3-5][0-9]) 18 + ICON=" " 19 + ;; 20 + [1-2][0-9]) 21 + ICON=" " 22 + ;; 23 + *) ICON=" " ;; 24 + esac 25 + 26 + if [ "$CHARGING" != "" ]; then 27 + ICON="" 28 + fi 29 + 30 + sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}% "
+20
home/darwin/sketchybar/plugins/sound.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + VOLUME=$(osascript -e "output volume of (get volume settings)") 4 + MUTED=$(osascript -e "output muted of (get volume settings)") 5 + 6 + if [ "$MUTED" != "false" ]; then 7 + ICON="󰖁 " 8 + VOLUME=0 9 + else 10 + case ${VOLUME} in 11 + 100) ICON=" " ;; 12 + [5-9]*) ICON=" " ;; 13 + [0-9]*) ICON=" " ;; 14 + *) ICON=" " ;; 15 + esac 16 + fi 17 + 18 + sketchybar -m \ 19 + --set "$NAME" icon=$ICON \ 20 + --set "$NAME" label="$VOLUME%"
+19
home/darwin/sketchybar/plugins/space.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors 4 + 5 + SPACE_ICONS=(" " " " "󰺻 " " " " " "6" "7" "8" "9" "10") 6 + 7 + SPACE_CLICK_SCRIPT="yabai -m space --focus $SID 2>/dev/null" 8 + 9 + if [ "$SELECTED" = "true" ]; then 10 + sketchybar --animate tanh 5 --set "$NAME" \ 11 + icon.color="$RED" \ 12 + icon="${SPACE_ICONS[$SID - 1]}" \ 13 + click_script="$SPACE_CLICK_SCRIPT" 14 + else 15 + sketchybar --animate tanh 5 --set "$NAME" \ 16 + icon.color="$COMMENT" \ 17 + icon="${SPACE_ICONS[$SID - 1]}" \ 18 + click_script="$SPACE_CLICK_SCRIPT" 19 + fi
+11
home/darwin/sketchybar/plugins/spotify.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + STATE="$(echo "$INFO" | jq -r '.state')" 4 + APP="$(echo "$INFO" | jq -r '.app')" 5 + 6 + if [ "$STATE" = "playing" ] && [ "$APP" == "Spotify" ]; then 7 + MEDIA="$(echo "$INFO" | jq -r '.title + " - " + .artist')" 8 + sketchybar --set "$NAME" label="$MEDIA" drawing=on 9 + else 10 + sketchybar --set "$NAME" drawing=off 11 + fi
+16
home/darwin/sketchybar/plugins/vpn.sh
··· 1 + #!/bin/bash 2 + 3 + ### You need to edit sudoers file to run wg-quick without password 4 + 5 + # %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick 6 + 7 + WG_PIDFILE="/var/run/wireguard/wg0.name" 8 + 9 + if [ -f $WG_PIDFILE ]; then 10 + sketchybar -m --set vpn icon= \ 11 + label="$VPN" \ 12 + drawing=on \ 13 + click_script="~/.config/sketchybar/plugins/wg_off.sh" 14 + else 15 + sketchybar -m --set vpn drawing=off click_script="~/.config/sketchybar/plugins/wg_on.sh" 16 + fi
+5
home/darwin/sketchybar/plugins/wg_off.sh
··· 1 + ### You need to edit sudoers file to run wg-quick without password 2 + 3 + # %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick 4 + 5 + sudo wg-quick down wg0
+5
home/darwin/sketchybar/plugins/wg_on.sh
··· 1 + ### You need to edit sudoers file to run wg-quick without password 2 + 3 + # %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick 4 + 5 + sudo wg-quick up wg0
+50
home/darwin/sketchybar/variables.sh
··· 1 + #!/usr/bin/env sh 2 + 3 + # Color Palette 4 + # Tokyonight Night 5 + BLACK=0xff24283b 6 + WHITE=0xffa9b1d6 7 + MAGENTA=0xffbb9af7 8 + BLUE=0xff7aa2f7 9 + CYAN=0xff7dcfff 10 + GREEN=0xff9ece6a 11 + YELLOW=0xffe0af68 12 + ORANGE=0xffff9e64 13 + RED=0xfff7768e 14 + BAR_COLOR=0xff1a1b26 15 + COMMENT=0xff565f89 16 + 17 + # Tokyonight Day 18 + # BLACK=0xffe9e9ed 19 + # WHITE=0xff3760bf 20 + # MAGENTA=0xff9854f1 21 + # BLUE=0xff2e7de9 22 + # CYAN=0xff007197 23 + # GREEN=0xff587539 24 + # YELLOW=0xff8c6c3e 25 + # ORANGE=0xffb15c00 26 + # RED=0xfff52a65 27 + # BAR_COLOR=0xffe1e2e7 28 + 29 + TRANSPARENT=0x00000000 30 + 31 + # General bar colors 32 + ICON_COLOR=$WHITE # Color of all icons 33 + LABEL_COLOR=$WHITE # Color of all labels 34 + 35 + ITEM_DIR="$HOME/.config/sketchybar/items" 36 + PLUGIN_DIR="$HOME/.config/sketchybar/plugins" 37 + 38 + FONT="Iosevka Nerd Font" 39 + 40 + PADDINGS=3 41 + 42 + POPUP_BORDER_WIDTH=2 43 + POPUP_CORNER_RADIUS=11 44 + POPUP_BACKGROUND_COLOR=$BLACK 45 + POPUP_BORDER_COLOR=$COMMENT 46 + 47 + CORNER_RADIUS=15 48 + BORDER_WIDTH=2 49 + 50 + SHADOW=on
+43
hosts/darwin/casks/default.nix
··· 1 + { ... }: 2 + 3 + { 4 + homebrew.enable = true; 5 + homebrew.brews = [ 6 + "kind" 7 + "kubectl" 8 + "bazelisk" 9 + "sourcegraph/src-cli/src-cli" 10 + "gh" 11 + # "postgresql@15" 12 + # "redis" 13 + ]; 14 + homebrew.casks = [ 15 + # Development Tools 16 + "homebrew/cask/docker" 17 + # "syncthing" 18 + # "insomnia" 19 + # "tableplus" 20 + # "ngrok" 21 + "postico" 22 + "wireshark" 23 + "1password" 24 + "orbstack" 25 + 26 + # Communication Tools 27 + # Already installed manually 28 + # "loom" 29 + # "slack" 30 + # "zoom" 31 + # "firefox" 32 + # "1password-cli" 33 + 34 + # Utility Tools 35 + # "syncthing" 36 + 37 + # Productivity Tools 38 + "raycast" 39 + 40 + # AI 41 + # "diffusionbee" 42 + ]; 43 + }
+154
hosts/darwin/default.nix
··· 1 + { self, pkgs, config, ... }: 2 + 3 + { 4 + imports = [ 5 + ./sketchybar 6 + ./yabai 7 + # ./casks 8 + # ../../modules/darwin/home-manager.nix 9 + # ../../modules/shared 10 + # ../../modules/shared/cachix 11 + ]; 12 + 13 + environment.systemPackages = [ 14 + pkgs.go 15 + pkgs.python3 16 + pkgs.cargo 17 + pkgs.k9s 18 + pkgs.kubernetes-helm 19 + pkgs.shellcheck 20 + ]; 21 + 22 + age.identityPaths = [ "/Users/anishlakhwara/.ssh/id_ed25519" ]; 23 + age.secrets.work-wg.file = "${self}/secrets/work-wg.age"; 24 + age.secrets.work-wg.owner = "anishlakhwara"; 25 + networking.wg-quick.interfaces = { 26 + wg0 = { 27 + address = [ "10.0.69.7/24" ]; 28 + listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers) 29 + privateKeyFile = config.age.secrets.work-wg.path; 30 + dns = [ "10.0.69.4" ]; 31 + postDown = '' 32 + sudo /usr/sbin/networksetup -setdnsservers Wi-Fi "Empty" 33 + ''; 34 + peers = [ 35 + # For a client configuration, one peer entry for the server will suffice. 36 + { 37 + publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI="; 38 + allowedIPs = [ "10.0.69.0/24" ]; 39 + # Set this to the server IP and port. 40 + 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 41 + persistentKeepalive = 25; 42 + } 43 + ]; 44 + }; 45 + }; 46 + 47 + # Auto upgrade nix package and the daemon service. 48 + services.nix-daemon.enable = true; 49 + nixpkgs.hostPlatform = "aarch64-darwin"; 50 + programs.zsh.enable = true; 51 + 52 + # Setup user, packages, programs 53 + nix = { 54 + # package = pkgs.nixUnstable; 55 + settings.trusted-users = [ "@admin" "anishlakhwara" ]; 56 + 57 + gc = { 58 + user = "root"; 59 + automatic = true; 60 + interval = { Weekday = 0; Hour = 2; Minute = 0; }; 61 + options = "--delete-older-than 30d"; 62 + }; 63 + 64 + # Turn this on to make command line easier 65 + extraOptions = '' 66 + experimental-features = nix-command flakes 67 + ''; 68 + }; 69 + 70 + # Turn off NIX_PATH warnings now that we're using flakes 71 + system.checks.verifyNixPath = false; 72 + 73 + # Load configuration that is shared across systems 74 + # environment.systemPackages = with pkgs; [ 75 + # 76 + # ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; }); 77 + 78 + # Enable fonts dir 79 + # fonts.fontDir.enable = true; 80 + fonts.packages = with pkgs; [ 81 + fira-code 82 + fira-code-symbols 83 + hermit 84 + #hack 85 + siji 86 + font-awesome 87 + proggyfonts 88 + (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; }) 89 + ]; 90 + 91 + system = { 92 + stateVersion = 4; 93 + 94 + keyboard = { 95 + enableKeyMapping = true; 96 + }; 97 + 98 + defaults = { 99 + LaunchServices = { 100 + LSQuarantine = false; 101 + }; 102 + 103 + NSGlobalDomain = { 104 + AppleShowAllExtensions = true; 105 + ApplePressAndHoldEnabled = false; 106 + 107 + # 120, 90, 60, 30, 12, 6, 2 108 + KeyRepeat = 2; 109 + 110 + # 120, 94, 68, 35, 25, 15 111 + InitialKeyRepeat = 15; 112 + 113 + "com.apple.mouse.tapBehavior" = 1; 114 + "com.apple.sound.beep.volume" = 0.0; 115 + "com.apple.sound.beep.feedback" = 0; 116 + }; 117 + 118 + loginwindow = { 119 + # disable guest account 120 + GuestEnabled = false; 121 + # show name instead of username 122 + SHOWFULLNAME = false; 123 + }; 124 + 125 + dock = { 126 + autohide = true; 127 + autohide-delay = 0.0; 128 + autohide-time-modifier = 1.0; 129 + static-only = false; 130 + showhidden = false; 131 + show-recents = false; 132 + launchanim = true; 133 + mouse-over-hilite-stack = true; 134 + orientation = "bottom"; 135 + tilesize = 48; 136 + mru-spaces = false; 137 + }; 138 + 139 + finder = { 140 + _FXShowPosixPathInTitle = false; 141 + }; 142 + 143 + trackpad = { 144 + Clicking = false; 145 + TrackpadThreeFingerDrag = true; 146 + }; 147 + }; 148 + 149 + # keyboard = { 150 + # enableKeyMapping = true; 151 + # remapCapsLockToControl = true; 152 + # }; 153 + }; 154 + }
+10
hosts/darwin/sketchybar/default.nix
··· 1 + { pkgs, ... }: 2 + 3 + { 4 + services.sketchybar = { 5 + enable = true; 6 + config = (builtins.readFile ./sketchybarrc); 7 + extraPackages = [ pkgs.jq ]; 8 + }; 9 + 10 + }
+59
hosts/darwin/sketchybar/sketchybarrc
··· 1 + #!/usr/bin/env bash 2 + 3 + source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors 4 + 5 + # General bar and defaults 6 + # parts I didn't want 7 + # y_offset=5 \ 8 + # margin=5 \ 9 + 10 + sketchybar --bar height=35 \ 11 + color="$BAR_COLOR" \ 12 + shadow="$SHADOW" \ 13 + position=top \ 14 + sticky=on \ 15 + padding_right=0 \ 16 + padding_left=3 \ 17 + corner_radius="$CORNER_RADIUS" \ 18 + blur_radius=20 \ 19 + notch_width=200 \ 20 + --default updates=when_shown \ 21 + icon.font="$FONT:Bold:13.5" \ 22 + icon.color="$ICON_COLOR" \ 23 + icon.padding_left="$PADDINGS" \ 24 + icon.padding_right="$PADDINGS" \ 25 + label.font="$FONT:Bold:13.0" \ 26 + label.color="$LABEL_COLOR" \ 27 + label.padding_left="$PADDINGS" \ 28 + label.padding_right="$PADDINGS" \ 29 + background.padding_right="$PADDINGS" \ 30 + background.padding_left="$PADDINGS" \ 31 + popup.background.border_width=1 \ 32 + popup.background.corner_radius=11 \ 33 + popup.background.border_color="$POPUP_BORDER_COLOR" \ 34 + popup.background.color="$POPUP_BACKGROUND_COLOR" \ 35 + popup.background.shadow.drawing="$SHADOW" 36 + 37 + # Left 38 + # source "$ITEM_DIR/apple.sh" 39 + source "$ITEM_DIR/spaces.sh" 40 + 41 + # Center (of notch) 42 + # source "$ITEM_DIR/spotify.sh" 43 + source "$ITEM_DIR/front_app.sh" 44 + 45 + # Right 46 + source "$ITEM_DIR/clock.sh" 47 + source "$ITEM_DIR/calendar.sh" 48 + source "$ITEM_DIR/battery.sh" 49 + source "$ITEM_DIR/volume.sh" 50 + source "$ITEM_DIR/cpu.sh" 51 + source "$ITEM_DIR/vpn.sh" 52 + 53 + #################### Finalizing Setup #################### 54 + 55 + # sketchybar --hotload true 56 + 57 + sketchybar --update 58 + 59 + echo "sketchybar configuration loaded.."
+102
hosts/darwin/yabai/default.nix
··· 1 + {pkgs, ... }: 2 + 3 + { 4 + services.yabai = { 5 + enable = true; 6 + config = { 7 + mouse_follows_focus = "off"; 8 + focus_follows_mouse = "off"; 9 + window_placement = "second_child"; 10 + window_topmost = "off"; 11 + window_opacity = "off"; 12 + window_opacity_duration = 0.0; 13 + window_shadow = "on"; 14 + window_border = "off"; 15 + window_border_placement = "inset"; 16 + window_border_width = 4; 17 + window_border_radius = -1.0; 18 + active_window_border_topmost = "off"; 19 + active_window_border_color = "0xff775759"; 20 + normal_window_border_color = "0xff505050"; 21 + insert_window_border_color = "0xffd75f5f"; 22 + active_window_opacity = 1.0; 23 + normal_window_opacity = 0.9; 24 + split_ratio = 0.73; 25 + auto_balance = "on"; 26 + mouse_modifier = "fn"; 27 + mouse_action1 = "move"; 28 + mouse_action2 = "resize"; 29 + layout = "bsp"; 30 + top_padding = 5; 31 + bottom_padding = 5; 32 + left_padding = 5; 33 + right_padding = 5; 34 + window_gap = 5; 35 + }; 36 + extraConfig = '' 37 + # Do not manage windows with certain titles eg. Copying files or moving to bin 38 + yabai -m rule --add title="(Copy|Bin|About This Mac|Info)" manage=off 39 + # Do not manage some apps which are not resizable 40 + yabai -m rule --add app="^(Calculator|System Preferences|[sS]tats|[Jj]et[Bb]rains [Tt]ool[Bb]ox|kftray)$" manage=off 41 + ''; 42 + }; 43 + 44 + system.activationScripts.yabai = { 45 + enable = true; 46 + text = '' 47 + yabai --install-service && yabai --start-service 48 + ''; 49 + }; 50 + 51 + services.skhd = { 52 + enable = true; 53 + skhdConfig = '' 54 + # Open iTerm2 55 + cmd - enter : kitty --single-instance -d ~ 56 + 57 + ################## 58 + # Window Motions # 59 + ################## 60 + # Rotate 61 + lalt - r : yabai -m space --rotate 90 62 + # Mirror verticaly 63 + lalt - x : yabai -m space --mirror y-axis 64 + # Mirror horizontaly 65 + lalt - y : yabai -m space --mirror x-axis 66 + # yes, i know i swapped x and y, but I mainly use y-axis and y is further... 67 + # Fullscreen 68 + cmd - f : yabai -m window --toggle zoom-fullscreen 69 + # Swap 70 + lalt - q : yabai -m window --swap west 71 + lalt - s : yabai -m window --swap south 72 + lalt - z : yabai -m window --swap north 73 + lalt - d : yabai -m window --swap east 74 + # Warp 75 + shift + lalt - q : yabai -m window --warp west 76 + shift + lalt - s : yabai -m window --warp south 77 + shift + lalt - z : yabai -m window --warp north 78 + shift + lalt - d : yabai -m window --warp east 79 + 80 + ######### 81 + # Focus # 82 + ######### 83 + # Clockwise 84 + # 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)")" 85 + # Counter-clockwise 86 + # 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)")" 87 + 88 + ########## 89 + # Spaces # 90 + ########## 91 + ctrl - left : yabai -m space --focus prev 92 + ctrl - right : yabai -m space --focus next 93 + ctrl + shift - right : yabai -m window --space next; yabai -m space --focus next 94 + ctrl + shift - left : yabai -m window --space prev; yabai -m space --focus prev 95 + cmd - 1 : yabai -m window --space 1; yabai -m space --focus 1 96 + cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2 97 + cmd - 3 : yabai -m window --space 3; yabai -m space --focus 3 98 + cmd - 4 : yabai -m window --space 4; yabai -m space --focus 4 99 + cmd - 5 : yabai -m window --space 5; yabai -m space --focus 5 100 + ''; 101 + }; 102 + }
+120
hosts/deck/configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page 3 + # and in the NixOS manual (accessible by running ‘nixos-help’). 4 + 5 + { config, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ]; 12 + 13 + # Bootloader. 14 + boot.loader.systemd-boot.enable = true; 15 + boot.loader.efi.canTouchEfiVariables = true; 16 + 17 + networking.hostName = "deck"; # Define your hostname. 18 + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 19 + 20 + # Configure network proxy if necessary 21 + # networking.proxy.default = "http://user:password@proxy:port/"; 22 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 23 + 24 + # Enable networking 25 + networking.networkmanager.enable = true; 26 + 27 + # Set your time zone. 28 + # time.timeZone = "America/Los_Angeles"; 29 + 30 + # Select internationalisation properties. 31 + i18n.defaultLocale = "en_US.UTF-8"; 32 + 33 + # i18n.extraLocaleSettings = { 34 + # LC_ADDRESS = "en_US.UTF-8"; 35 + # LC_IDENTIFICATION = "en_US.UTF-8"; 36 + # LC_MEASUREMENT = "en_US.UTF-8"; 37 + # LC_MONETARY = "en_US.UTF-8"; 38 + # LC_NAME = "en_US.UTF-8"; 39 + # LC_NUMERIC = "en_US.UTF-8"; 40 + # LC_PAPER = "en_US.UTF-8"; 41 + # LC_TELEPHONE = "en_US.UTF-8"; 42 + # LC_TIME = "en_US.UTF-8"; 43 + # }; 44 + 45 + # Enable the X11 windowing system. 46 + # services.xserver.enable = true; 47 + 48 + # Enable the GNOME Desktop Environment. 49 + # services.xserver.displayManager.gdm.enable = true; 50 + # services.xserver.desktopManager.gnome.enable = true; 51 + 52 + # Configure keymap in X11 53 + # services.xserver.xkb = { 54 + # layout = "us"; 55 + # variant = ""; 56 + # }; 57 + 58 + 59 + # use the example session manager (no others are packaged yet so this is enabled by default, 60 + # no need to redefine it in your config for now) 61 + #media-session.enable = true; 62 + 63 + # Enable touchpad support (enabled default in most desktopManager). 64 + # services.xserver.libinput.enable = true; 65 + 66 + # Define a user account. Don't forget to set a password with ‘passwd’. 67 + # users.users.anish = { 68 + # isNormalUser = true; 69 + # extraGroups = [ "networkmanager" "wheel" ]; 70 + # packages = with pkgs; [ 71 + # # thunderbird 72 + # ]; 73 + # }; 74 + 75 + # Enable automatic login for the user. 76 + services.xserver.displayManager.autoLogin.enable = true; 77 + services.xserver.displayManager.autoLogin.user = "anish"; 78 + 79 + # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 80 + systemd.services."getty@tty1".enable = false; 81 + systemd.services."autovt@tty1".enable = false; 82 + 83 + # Install firefox. 84 + # programs.firefox.enable = true; 85 + 86 + # List packages installed in system profile. To search, run: 87 + # $ nix search wget 88 + environment.systemPackages = with pkgs; [ 89 + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 90 + # wget 91 + ]; 92 + 93 + # Some programs need SUID wrappers, can be configured further or are 94 + # started in user sessions. 95 + # programs.mtr.enable = true; 96 + # programs.gnupg.agent = { 97 + # enable = true; 98 + # enableSSHSupport = true; 99 + # }; 100 + 101 + # List services that you want to enable: 102 + 103 + # Enable the OpenSSH daemon. 104 + # services.openssh.enable = true; 105 + 106 + # Open ports in the firewall. 107 + # networking.firewall.allowedTCPPorts = [ ... ]; 108 + # networking.firewall.allowedUDPPorts = [ ... ]; 109 + # Or disable the firewall altogether. 110 + # networking.firewall.enable = false; 111 + 112 + # This value determines the NixOS release from which the default 113 + # settings for stateful data, like file locations and database versions 114 + # on your system were taken. It‘s perfectly fine and recommended to leave 115 + # this value at the release version of the first install of this system. 116 + # Before changing this value read the documentation for this option 117 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 118 + system.stateVersion = "24.11"; # Did you read the comment? 119 + 120 + }
+51
hosts/deck/default.nix
··· 1 + { self, pkgs, config, ... }: 2 + { 3 + imports = [ 4 + ./configuration.nix 5 + ../users/anish 6 + ../profiles/core 7 + # ../profiles/bluetooth 8 + # ../profiles/music 9 + ../profiles/sync/cal 10 + ../profiles/wifi 11 + ../profiles/desktop 12 + ../profiles/mimetypes 13 + ../profiles/syncthing 14 + ../profiles/mossnet-hosts 15 + # ../profiles/fly-wg 16 + # ../profiles/mount-mossnet 17 + ]; 18 + 19 + # age.secrets.deck-wg.file = "${self}/secrets/deck-wg.age"; 20 + # age.secrets.deck-wg.owner = "deck"; 21 + # mossnet.wg = { 22 + # enable = true; 23 + # ips = [ "10.0.69.6/24" ]; 24 + # privateKeyFile = "/run/agenix/deck-wg"; 25 + # }; 26 + 27 + users.users.anish.extraGroups = [ "adbusers" "wheel" "plugdev" "libvertd" ]; 28 + # boot.plymouth = { 29 + # enable = true; 30 + # themePackages = [ pkgs.plymouth-themes ]; 31 + # theme = "motion"; 32 + # }; 33 + 34 + jovian.steam.enable = true; 35 + jovian.devices.steamdeck.enable = true; 36 + jovian.steam.user = "anish"; 37 + jovian.steam.autoStart = true; 38 + jovian.steam.desktopSession = "gnome"; 39 + # jovian.steam.desktopSession = "none+bspwm"; 40 + 41 + # Install XR drivers 42 + # environment.systemPackages = with pkgs; [ 43 + # xrlinuxdriver 44 + # breezy-gnome 45 + # ]; 46 + 47 + # services.udev.packages = with pkgs; [ 48 + # xrlinuxdriver 49 + # ]; 50 + 51 + }
+40
hosts/deck/hardware-configuration.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { config, lib, pkgs, modulesPath, ... }: 5 + 6 + { 7 + imports = 8 + [ (modulesPath + "/installer/scan/not-detected.nix") 9 + ]; 10 + 11 + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "sdhci_pci" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-amd" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/d432dae0-3512-4891-9582-56d7ecd8524c"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + fileSystems."/boot" = 22 + { device = "/dev/disk/by-uuid/5B4C-7406"; 23 + fsType = "vfat"; 24 + options = [ "fmask=0077" "dmask=0077" ]; 25 + }; 26 + 27 + swapDevices = 28 + [ { device = "/dev/disk/by-uuid/f75a730e-c849-4edd-a17f-52492d4260dc"; } 29 + ]; 30 + 31 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 32 + # (the default) this is the recommended approach. When using systemd-networkd it's 33 + # still possible to use this option, but it's recommended to use it in conjunction 34 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 35 + networking.useDHCP = lib.mkDefault true; 36 + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; 37 + 38 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 39 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 40 + }
+12
modules/darwin/README.md
··· 1 + 2 + ## Layout 3 + ``` 4 + . 5 + ├── dock # MacOS dock configuration 6 + ├── casks.nix # List of homebrew casks 7 + ├── default.nix # Defines module, system-level config 8 + ├── files.nix # Non-Nix, static configuration files (now immutable!) 9 + ├── home-manager.nix # Defines user programs 10 + ├── packages.nix # List of packages to install for MacOS 11 + ├── secrets.nix # Age-encrypted secrets with agenix 12 + ```
+67
modules/darwin/dock/default.nix
··· 1 + { config, pkgs, lib, ... }: 2 + with lib; 3 + let 4 + cfg = config.local.dock; 5 + inherit (pkgs) stdenv dockutil; 6 + in 7 + { 8 + options = { 9 + local.dock.enable = mkOption { 10 + description = "Enable dock"; 11 + default = stdenv.isDarwin; 12 + example = false; 13 + }; 14 + 15 + local.dock.entries = mkOption 16 + { 17 + description = "Entries on the Dock"; 18 + type = with types; listOf (submodule { 19 + options = { 20 + path = lib.mkOption { type = str; }; 21 + section = lib.mkOption { 22 + type = str; 23 + default = "apps"; 24 + }; 25 + options = lib.mkOption { 26 + type = str; 27 + default = ""; 28 + }; 29 + }; 30 + }); 31 + readOnly = true; 32 + }; 33 + }; 34 + 35 + config = 36 + mkIf cfg.enable 37 + ( 38 + let 39 + normalize = path: if hasSuffix ".app" path then path + "/" else path; 40 + entryURI = path: "file://" + (builtins.replaceStrings 41 + [" " "!" "\"" "#" "$" "%" "&" "'" "(" ")"] 42 + ["%20" "%21" "%22" "%23" "%24" "%25" "%26" "%27" "%28" "%29"] 43 + (normalize path) 44 + ); 45 + wantURIs = concatMapStrings 46 + (entry: "${entryURI entry.path}\n") 47 + cfg.entries; 48 + createEntries = concatMapStrings 49 + (entry: "${dockutil}/bin/dockutil --no-restart --add '${entry.path}' --section ${entry.section} ${entry.options}\n") 50 + cfg.entries; 51 + in 52 + { 53 + system.activationScripts.postUserActivation.text = '' 54 + echo >&2 "Setting up the Dock..." 55 + haveURIs="$(${dockutil}/bin/dockutil --list | ${pkgs.coreutils}/bin/cut -f2)" 56 + if ! diff -wu <(echo -n "$haveURIs") <(echo -n '${wantURIs}') >&2 ; then 57 + echo >&2 "Resetting Dock." 58 + ${dockutil}/bin/dockutil --no-restart --remove all 59 + ${createEntries} 60 + killall Dock 61 + else 62 + echo >&2 "Dock setup complete." 63 + fi 64 + ''; 65 + } 66 + ); 67 + }
+54
modules/darwin/files.nix
··· 1 + { user, config, pkgs, ... }: 2 + 3 + let 4 + xdg_configHome = "${config.users.users.${user}.home}/.config"; 5 + xdg_dataHome = "${config.users.users.${user}.home}/.local/share"; 6 + xdg_stateHome = "${config.users.users.${user}.home}/.local/state"; in 7 + { 8 + 9 + # Raycast script so that "Run Emacs" is available and uses Emacs daemon 10 + "${xdg_dataHome}/bin/emacsclient" = { 11 + executable = true; 12 + text = '' 13 + #!/bin/zsh 14 + # 15 + # Required parameters: 16 + # @raycast.schemaVersion 1 17 + # @raycast.title Run Emacs 18 + # @raycast.mode silent 19 + # 20 + # Optional parameters: 21 + # @raycast.packageName Emacs 22 + # @raycast.icon ${xdg_dataHome}/img/icons/Emacs.icns 23 + # @raycast.iconDark ${xdg_dataHome}/img/icons/Emacs.icns 24 + 25 + if [[ $1 = "-t" ]]; then 26 + # Terminal mode 27 + ${pkgs.emacs}/bin/emacsclient -t $@ 28 + else 29 + # GUI mode 30 + ${pkgs.emacs}/bin/emacsclient -c -n $@ 31 + fi 32 + ''; 33 + }; 34 + 35 + # Script to import Drafts into Emacs org-roam 36 + "${xdg_dataHome}/bin/import-drafts" = { 37 + executable = true; 38 + text = '' 39 + #!/bin/sh 40 + 41 + for f in ${xdg_stateHome}/drafts/* 42 + do 43 + if [[ ! "$f" =~ "done" ]]; then 44 + echo "Importing $f" 45 + filename="$(head -c 10 $f)" 46 + output="${xdg_dataHome}/org-roam/daily/$filename.org" 47 + echo '\n' >> "$output" 48 + tail -n +3 $f >> "$output" 49 + mv $f done 50 + fi 51 + done 52 + ''; 53 + }; 54 + }
+85
modules/darwin/home-manager.nix
··· 1 + { config, pkgs, lib, home-manager, ... }: 2 + 3 + let 4 + user = "anishlakhwara"; 5 + # Define the content of your file as a derivation 6 + myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" '' 7 + #!/bin/sh 8 + emacsclient -c -n & 9 + ''; 10 + sharedFiles = import ../shared/files.nix { inherit config pkgs; }; 11 + additionalFiles = import ./files.nix { inherit user config pkgs; }; 12 + in 13 + { 14 + imports = [ 15 + ./dock 16 + ]; 17 + 18 + # It me 19 + users.users.${user} = { 20 + name = "${user}"; 21 + home = "/Users/${user}"; 22 + isHidden = false; 23 + shell = pkgs.zsh; 24 + }; 25 + 26 + # Enable home-manager 27 + home-manager = { 28 + useGlobalPkgs = true; 29 + users.${user} = { pkgs, config, lib, ... }:{ 30 + home = { 31 + enableNixpkgsReleaseCheck = false; 32 + packages = pkgs.callPackage ./packages.nix {}; 33 + file = lib.mkMerge [ 34 + sharedFiles 35 + additionalFiles 36 + { "emacs-launcher.command".source = myEmacsLauncher; } 37 + ]; 38 + 39 + stateVersion = "23.11"; 40 + }; 41 + 42 + programs = {} // import ../shared/home-manager.nix { inherit config pkgs lib; }; 43 + 44 + # Marked broken Oct 20, 2022 check later to remove this 45 + # https://github.com/nix-community/home-manager/issues/3344 46 + manual.manpages.enable = false; 47 + }; 48 + }; 49 + 50 + # Fully declarative dock using the latest from Nix Store 51 + local = { 52 + dock.enable = true; 53 + dock.entries = [ 54 + { path = "/Applications/Slack.app/"; } 55 + { path = "/System/Applications/Messages.app/"; } 56 + { path = "/System/Applications/Facetime.app/"; } 57 + { path = "/Applications/Telegram.app/"; } 58 + { path = "${pkgs.alacritty}/Applications/Alacritty.app/"; } 59 + { path = "/System/Applications/Music.app/"; } 60 + { path = "/System/Applications/News.app/"; } 61 + { path = "/System/Applications/Photos.app/"; } 62 + { path = "/System/Applications/Photo Booth.app/"; } 63 + { path = "/System/Applications/TV.app/"; } 64 + { path = "${pkgs.jetbrains.phpstorm}/Applications/PhpStorm.app/"; } 65 + { path = "/Applications/TablePlus.app/"; } 66 + { path = "/Applications/Asana.app/"; } 67 + { path = "/Applications/Drafts.app/"; } 68 + { path = "/System/Applications/Home.app/"; } 69 + { 70 + path = toString myEmacsLauncher; 71 + section = "others"; 72 + } 73 + { 74 + path = "${config.users.users.${user}.home}/.local/share/"; 75 + section = "others"; 76 + options = "--sort name --view grid --display folder"; 77 + } 78 + { 79 + path = "${config.users.users.${user}.home}/.local/share/downloads"; 80 + section = "others"; 81 + options = "--sort name --view grid --display stack"; 82 + } 83 + ]; 84 + }; 85 + }
+7
modules/darwin/packages.nix
··· 1 + { pkgs }: 2 + 3 + with pkgs; 4 + let shared-packages = import ../shared/packages.nix { inherit pkgs; }; in 5 + shared-packages ++ [ 6 + dockutil 7 + ]
+47
modules/darwin/secrets.nix
··· 1 + { config, pkgs, agenix, secrets, ... }: 2 + 3 + let user = "dustin"; in 4 + { 5 + age = { 6 + identityPaths = [ 7 + "/Users/${user}/.ssh/id_ed25519" 8 + ]; 9 + 10 + secrets = { 11 + "syncthing-cert" = { 12 + symlink = true; 13 + path = "/Users/${user}/Library/Application Support/Syncthing/cert.pem"; 14 + file = "${secrets}/darwin-syncthing-cert.age"; 15 + mode = "644"; 16 + owner = "${user}"; 17 + group = "staff"; 18 + }; 19 + 20 + "syncthing-key" = { 21 + symlink = true; 22 + path = "/Users/${user}/Library/Application Support/Syncthing/key.pem"; 23 + file = "${secrets}/darwin-syncthing-key.age"; 24 + mode = "600"; 25 + owner = "${user}"; 26 + group = "staff"; 27 + }; 28 + 29 + "github-ssh-key" = { 30 + symlink = true; 31 + path = "/Users/${user}/.ssh/id_github"; 32 + file = "${secrets}/github-ssh-key.age"; 33 + mode = "600"; 34 + owner = "${user}"; 35 + group = "staff"; 36 + }; 37 + 38 + "github-signing-key" = { 39 + symlink = false; 40 + path = "/Users/${user}/.ssh/pgp_github.key"; 41 + file = "${secrets}/github-signing-key.age"; 42 + mode = "600"; 43 + owner = "${user}"; 44 + }; 45 + }; 46 + }; 47 + }
+54
pkgs/breezy-gnome.nix
··· 1 + # Imported from https://github.com/wheaney/breezy-desktop/pull/113/files 2 + # Use flake or nixpkgs once upstreamed 3 + { 4 + self, 5 + lib, 6 + stdenv, 7 + glib, 8 + ... 9 + }: stdenv.mkDerivation { 10 + pname = "breezy-gnome"; 11 + version = "unstable"; 12 + 13 + src = lib.cleanSource "${self}/gnome/src/."; 14 + 15 + buildInputs = [ 16 + glib 17 + ]; 18 + 19 + passthru = { 20 + extensionUuid = "breezydesktop@xronlinux.com"; 21 + }; 22 + 23 + buildPhase = '' 24 + mkdir -p build/schemas 25 + glib-compile-schemas --targetdir="build/schemas" $src/schemas/ 26 + cp $src/*.js build/ 27 + cp $src/*.frag build/ 28 + mkdir -p build/schemas/ 29 + cp $src/schemas/*.xml build/schemas/ 30 + mkdir -p build/dbus-interfaces/ 31 + cp $src/dbus-interfaces/*.xml build/dbus-interfaces/ 32 + mkdir -p build/textures/ 33 + cp -rL $src/textures/* build/textures/ 34 + cp $src/metadata.json build/ 35 + ''; 36 + 37 + installPhase = '' 38 + extra_source=() 39 + for file in "$DEST_DIR"/*; do 40 + extra_source+=("--extra-source=$file") 41 + done 42 + gnome-extensions pack --force "$${extra_source[@]}" "build" -o "$out" 43 + ''; 44 + 45 + doInstallCheck = false; 46 + # The default release is a script which will do an impure download 47 + # just ensure that the application can run without network 48 + 49 + meta = with lib; { 50 + homepage = "https://github.com/wheaney/breezy-desktop"; 51 + maintainers = with maintainers; [shymega]; 52 + platforms = platforms.linux; 53 + }; 54 + }
+114
pkgs/xr-linux-driver.nix
··· 1 + # Imported from https://github.com/wheaney/XRLinuxDriver/pull/80/files 2 + # Use flake or nixpkgs once upstreamed 3 + { 4 + self, 5 + lib, 6 + pkgs, 7 + stdenv, 8 + fetchFromGitLab, 9 + libusb1, 10 + curl, 11 + openssl, 12 + libevdev, 13 + json_c, 14 + hidapi, 15 + wayland, 16 + cmake, 17 + pkg-config, 18 + python3, 19 + libffi, 20 + autoPatchelfHook, 21 + ... 22 + }: let 23 + pythonEnv = python3.withPackages (ps: [ps.pyyaml]); 24 + buildInputs = [ 25 + curl 26 + hidapi 27 + json_c 28 + libevdev 29 + libffi 30 + libusb1 31 + openssl 32 + stdenv.cc.cc.lib 33 + wayland 34 + ]; 35 + arch = 36 + if pkgs.system == "aarch64-linux" 37 + then "aarch64" 38 + else if pkgs.system == "x86_64-linux" 39 + then "x86_64" 40 + else throw "Unsupported system ${pkgs.system}"; 41 + in 42 + stdenv.mkDerivation rec { 43 + pname = "xrlinuxdriver"; 44 + version = "0.12.0.1"; 45 + 46 + srcs = [ 47 + (fetchFromGitLab rec { 48 + domain = "gitlab.com"; 49 + owner = "TheJackiMonster"; 50 + repo = "nrealAirLinuxDriver"; 51 + rev = "3225fcc575e19a8407d5019903567cff1c3ed1a8"; 52 + hash = "sha256-NRbcANt/CqREQZoYIYtTGVbvkZ7uo2Tm90s6prlsrQE="; 53 + fetchSubmodules = true; 54 + name = "${repo}-src"; 55 + }) 56 + (lib.cleanSourceWith { 57 + src = self; 58 + name = "${pname}-src"; 59 + }) 60 + ]; 61 + sourceRoot = "${(builtins.elemAt srcs 1).name}"; 62 + 63 + postUnpack = let 64 + nrealAirLinuxDriver = (builtins.elemAt srcs 0).name; 65 + in '' 66 + mkdir -p $sourceRoot/modules/xrealInterfaceLibrary 67 + cp -R ${nrealAirLinuxDriver}/* $sourceRoot/modules/xrealInterfaceLibrary 68 + chmod -R u+w $sourceRoot 69 + ''; 70 + 71 + nativeBuildInputs = [ 72 + cmake 73 + pkg-config 74 + pythonEnv 75 + autoPatchelfHook 76 + ]; 77 + inherit buildInputs; 78 + 79 + cmakeFlags = [ 80 + "-DCMAKE_SKIP_RPATH=ON" 81 + ]; 82 + cmakeBuildDir = "build"; 83 + cmakeBuildType = "RelWithDebInfo"; 84 + 85 + installPhase = '' 86 + mkdir -p $out/bin $out/lib/systemd/user $out/lib/udev/rules.d $out/lib/${arch} 87 + cp xrDriver ../bin/xr_driver_cli ../bin/xr_driver_verify $out/bin 88 + cp ../udev/* $out/lib/udev/rules.d/ 89 + cp ../lib/${arch}/* $out/lib/${arch}/ 90 + cp ../systemd/xr-driver.service $out/lib/systemd/user/xr-driver.service 91 + cp ${hidapi}/lib/libhidapi-hidraw.so.0 $out/lib/ 92 + substituteInPlace \ 93 + $out/lib/systemd/user/xr-driver.service \ 94 + --replace-fail "ExecStart={bin_dir}/xrDriver" "ExecStart=$out/bin/xrDriver" \ 95 + --replace-fail "{ld_library_path}" "$out/lib/${arch}" 96 + ''; 97 + 98 + preBuild = '' 99 + addAutoPatchelfSearchPath $out/usr/lib/${arch} 100 + ''; 101 + 102 + doInstallCheck = false; 103 + # The default release is a script which will do an impure download 104 + # just ensure that the application can run without network 105 + 106 + meta = with lib; { 107 + homepage = "https://github.com/wheaney/XRLinuxDriver"; 108 + license = licenses.mit; 109 + description = "Linux service for interacting with XR devices."; 110 + mainProgram = "xrDriver"; 111 + maintainers = with maintainers; [shymega]; 112 + platforms = platforms.linux; 113 + }; 114 + }