Update flake environments
This commit is contained in:
12
env/c_cxx.nix → env/flake_c++-with-libs.nix
vendored
12
env/c_cxx.nix → env/flake_c++-with-libs.nix
vendored
@ -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 ./ &";
|
||||
# }
|
||||
];
|
||||
};
|
||||
});
|
2
env/c_cxx_libs.nix → env/flake_c++.nix
vendored
2
env/c_cxx_libs.nix → env/flake_c++.nix
vendored
@ -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
|
14
env/latex.nix → env/flake_latex.nix
vendored
14
env/latex.nix → env/flake_latex.nix
vendored
@ -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 = [
|
||||
# ];
|
||||
};
|
||||
});
|
||||
}
|
33
env/python.nix → env/flake_python.nix
vendored
33
env/python.nix → env/flake_python.nix
vendored
@ -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
|
18
env/rust.nix → env/flake_rust.nix
vendored
18
env/rust.nix → env/flake_rust.nix
vendored
@ -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 ./ &";
|
||||
# }
|
||||
];
|
||||
};
|
||||
});
|
75
env/python_pytorch.nix
vendored
75
env/python_pytorch.nix
vendored
@ -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 = "";
|
||||
# }
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user