File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ { pkgs , ... } : {
2+ channel = "unstable" ;
3+ packages = [
4+ ] ;
5+ env = { } ;
6+ idx = {
7+ extensions = [
8+ ] ;
9+ previews = {
10+ enable = true ;
11+ previews = { } ;
12+ } ;
13+ #Workspace lifecycle hooks
14+ workspace = {
15+ onCreate = {
16+ default . openFiles = [ ".idx/dev.nix" "README.md" ] ;
17+ } ;
18+ #Runs when the workspace is (re)started
19+ onStart = {
20+ #Install SOAR and ensure it's in the PATH
21+ setup = ''
22+ #Debloat
23+ rm -rf "$HOME/.android"* 2>/dev/null
24+ rm -rf "$HOME/.emu" 2>/dev/null
25+ rm -rf "$HOME/.npm" 2>/dev/null
26+
27+ #Install SOAR
28+ curl -fsSL 'https://soar.qaidvoid.dev/install.sh' | sh
29+ mkdir -p "$HOME/.local/share/soar/bin"
30+ if [ -f "./soar" ]; then
31+ mv "./soar" "$HOME/.local/share/soar/bin/soar"
32+ chmod +x "$HOME/.local/share/soar/bin/soar"
33+ if [ ! -s "$HOME/.config/soar/config.toml" ]; then
34+ "$HOME/.local/share/soar/bin/soar" defconfig --external
35+ fi
36+ fi
37+ if [ -f "$HOME/.bashrc" ]; then
38+ if ! grep -q "export PATH=\$PATH:\$HOME/.local/share/soar/bin" "$HOME/.bashrc"; then
39+ echo 'export PATH=$PATH:$HOME/.local/share/soar/bin' >> "$HOME/.bashrc"
40+ fi
41+ fi
42+ export PATH="$PATH:$HOME/.local/share/soar/bin"
43+ '' ;
44+ } ;
45+ } ;
46+ } ;
47+ }
You can’t perform that action at this time.
0 commit comments