diff --git a/env/c_cxx.nix b/env/flake_c++-with-libs.nix similarity index 90% rename from env/c_cxx.nix rename to env/flake_c++-with-libs.nix index c1bc2d31..eabadf36 100644 --- a/env/c_cxx.nix +++ b/env/flake_c++-with-libs.nix @@ -71,16 +71,16 @@ # Development # bear # To generate compilation database gdb - cling # To try out my bullshit implementations + # cling # To try out my bullshit implementations # doxygen # Generate docs + graphs ]; commands = [ - { - name = "ide"; - help = "Run clion for project"; - command = "clion &>/dev/null ./ &"; - } + # { + # name = "ide"; + # help = "Run clion for project"; + # command = "clion &>/dev/null ./ &"; + # } ]; }; }); diff --git a/env/c_cxx_libs.nix b/env/flake_c++.nix similarity index 97% rename from env/c_cxx_libs.nix rename to env/flake_c++.nix index 7470c761..9dc7c740 100644 --- a/env/c_cxx_libs.nix +++ b/env/flake_c++.nix @@ -69,7 +69,7 @@ # Development # bear # To generate compilation database gdb - cling # To try out my bullshit implementations + # cling # To try out my bullshit implementations # doxygen # Generate docs + graphs # Libraries diff --git a/env/latex.nix b/env/flake_latex.nix similarity index 70% rename from env/latex.nix rename to env/flake_latex.nix index cf840f03..1dbeed3d 100644 --- a/env/latex.nix +++ b/env/flake_latex.nix @@ -17,14 +17,26 @@ config.allowUnfree = true; overlays = [devshell.overlays.default]; }; - # TODO: Custom LaTeX "distribution"? With curated packages? + + latexPython = pkgs.python311.withPackages (p: + with p; [ + rich + pygments + ]); in { devShell = pkgs.devshell.mkShell { name = "LaTeX Environment"; packages = with pkgs; [ + texlive.combined.scheme-full + inkscape + latexPython texlab ]; + + # Use $1 for positional args + # commands = [ + # ]; }; }); } diff --git a/env/python.nix b/env/flake_python.nix similarity index 55% rename from env/python.nix rename to env/flake_python.nix index 45587f9a..a509f275 100644 --- a/env/python.nix +++ b/env/flake_python.nix @@ -1,5 +1,5 @@ { - description = ""; + description = "Python Environment"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; @@ -15,22 +15,39 @@ pkgs = import nixpkgs { inherit system; config.allowUnfree = true; - overlays = [devshell.overlay]; + overlays = [devshell.overlays.default]; }; - myPython = pkgs.python310.withPackages (p: + python-with-packages = pkgs.python311.withPackages (p: with p; [ + # Basic rich - numpy - scipy - matplotlib + # python-dotenv + + # Math + # numpy + # matplotlib + # sympy + + # Web + # flask + # flask-sqlalchemy + # sqlalchemy + + # Discord + # discordpy + # pynacl # discordpy voice support + + # Scraping + # beautifulsoup4 + # requests ]); in { devShell = pkgs.devshell.mkShell { - name = ""; + name = "Python Environment"; packages = with pkgs; [ - myPython + python-with-packages ]; # Use $1 for positional args diff --git a/env/rust.nix b/env/flake_rust.nix similarity index 83% rename from env/rust.nix rename to env/flake_rust.nix index aa93f2c2..49d5e7a7 100644 --- a/env/rust.nix +++ b/env/flake_rust.nix @@ -1,5 +1,5 @@ { - description = "Rust development shell"; + description = "Rust Environment"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; @@ -18,7 +18,7 @@ inherit system; config.allowUnfree = true; # For clion overlays = [ - devshell.overlay + devshell.overlays.default rust-overlay.overlays.default ]; }; @@ -29,13 +29,11 @@ }; in { devShell = pkgs.devshell.mkShell { - name = "Rust development shell"; + name = "Rust Environment"; packages = with pkgs; [ rust-stable rust-analyzer - - jetbrains.clion ]; env = [ @@ -53,11 +51,11 @@ ]; commands = [ - { - name = "ide"; - help = "Run clion for project"; - command = "clion &>/dev/null ./ &"; - } + # { + # name = "ide"; + # help = "Run clion for project"; + # command = "clion &>/dev/null ./ &"; + # } ]; }; }); diff --git a/env/python_pytorch.nix b/env/python_pytorch.nix deleted file mode 100644 index 03622f5e..00000000 --- a/env/python_pytorch.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - description = "Machine Learning Environment"; - - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.devshell.url = "github:numtide/devshell"; - - outputs = { - self, - nixpkgs, - flake-utils, - devshell, - }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [devshell.overlay]; - }; - - # TODO: Originally it was nixpkgs.fetchurl but that didn't work, pkgs.fetchurl did... - # Determine the difference between nixpkgs and pkgs - - # NOTE: These packages have to be updated manually! - - # Taken from: https://github.com/gbtb/nix-stable-diffusion/blob/master/flake.nix - # Overlay: https://nixos.wiki/wiki/Overlays - # FetchURL: https://ryantm.github.io/nixpkgs/builders/fetchers/ - torch-rocm = pkgs.hiPrio (pkgs.python310Packages.torch-bin.overrideAttrs (old: { - src = pkgs.fetchurl { - name = "torch-1.12.1+rocm5.1.1-cp310-cp310-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/rocm5.1.1/torch-1.12.1%2Brocm5.1.1-cp310-cp310-linux_x86_64.whl"; - hash = "sha256-kNShDx88BZjRQhWgnsaJAT8hXnStVMU1ugPNMEJcgnA="; - }; - })); - torchvision-rocm = pkgs.hiPrio (pkgs.python310Packages.torchvision-bin.overrideAttrs (old: { - src = pkgs.fetchurl { - name = "torchvision-0.13.1+rocm5.1.1-cp310-cp310-linux_x86_64.whl"; - url = "https://download.pytorch.org/whl/rocm5.1.1/torchvision-0.13.1%2Brocm5.1.1-cp310-cp310-linux_x86_64.whl"; - hash = "sha256-mYk4+XNXU6rjpgWfKUDq+5fH/HNPQ5wkEtAgJUDN/Jg="; - }; - })); - - myPython = pkgs.python310.withPackages (p: - with p; [ - # Basic - rich - - # MachineLearning - torch-rocm - torchvision-rocm - numpy - matplotlib - nltk - ]); - in { - devShell = pkgs.devshell.mkShell { - name = "Machine Learning Environment"; - - packages = with pkgs; [ - myPython - nodePackages.pyright # LSP - ]; - - # Use $1 for positional args - commands = [ - # { - # name = ""; - # help = ""; - # command = ""; - # } - ]; - }; - }); -}