diff --git a/cleanup.sh b/cleanup.sh new file mode 100644 index 0000000..dab7d43 --- /dev/null +++ b/cleanup.sh @@ -0,0 +1,3 @@ +nix-env --delete-generations old +nix-store --gc +# nix-collect-garbage -d \ No newline at end of file diff --git a/hero_shell.sh b/hero_shell.sh index 09c2e42..22c8ca0 100755 --- a/hero_shell.sh +++ b/hero_shell.sh @@ -102,4 +102,5 @@ cd ${BASE} nuscript_get -nu --config nuscripts/config/config.nu --env-config nuscripts/config/env.nu -e 'source nuscripts/load.nu; $env.PATH = (paths_nix)' \ No newline at end of file +nu --config nuscripts/config/config.nu --env-config nuscripts/config/env.nu \ + -e 'source nuscripts/load.nu; $env.PATH = (paths_nix); herotools install_crystal; herotools install_hero' \ No newline at end of file diff --git a/shell.nix b/shell.nix index 30f6647..8f31119 100644 --- a/shell.nix +++ b/shell.nix @@ -1,32 +1,35 @@ -let - nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; - pkgs = import nixpkgs { config = {}; overlays = []; }; -in - -pkgs.mkShell { - packages = with pkgs; [ - git - nushellFull - mc - jq - # libtorrent-rasterbar - # python311Packages.libtorrent-rasterbar - python311Full - python311Packages.ipython - python311Packages.ipdb - python311Packages.rq - rsync - rustc - go - duf - gdu - vscode-with-extensions - vscode-extensions.thenuprojectcontributors.vscode-nushell-lang - - ]; - # shellHook = '' - # echo "Nix shell environment is ready." - # hero_shell.sh - # ''; -} - +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShell { + packages = with pkgs; [ + git + nushellFull + mc + jq + # libtorrent-rasterbar + # python311Packages.libtorrent-rasterbar + python311Full + python311Packages.ipython + python311Packages.ipdb + python311Packages.rq + rsync + rustc + go + duf + gdu + + ]; + + # BIN_MC = "${pkgs.mc}/bin"; + + shellHook = '' + cd $BASE + git status + echo $BASE + $BASE/hero_shell.sh + ''; +} + diff --git a/start.sh b/start.sh index 041c0c7..6f8cf8e 100755 --- a/start.sh +++ b/start.sh @@ -1,9 +1,11 @@ #!/usr/bin/env bash set -e -MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "$MYDIR" - +export BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd "$BASE" export NIXPKGS_ALLOW_UNFREE=1 + +code $BASE/code + nix-shell