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
|
# Development
|
||||||
# bear # To generate compilation database
|
# bear # To generate compilation database
|
||||||
gdb
|
gdb
|
||||||
cling # To try out my bullshit implementations
|
# cling # To try out my bullshit implementations
|
||||||
# doxygen # Generate docs + graphs
|
# doxygen # Generate docs + graphs
|
||||||
];
|
];
|
||||||
|
|
||||||
commands = [
|
commands = [
|
||||||
{
|
# {
|
||||||
name = "ide";
|
# name = "ide";
|
||||||
help = "Run clion for project";
|
# help = "Run clion for project";
|
||||||
command = "clion &>/dev/null ./ &";
|
# 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
|
# Development
|
||||||
# bear # To generate compilation database
|
# bear # To generate compilation database
|
||||||
gdb
|
gdb
|
||||||
cling # To try out my bullshit implementations
|
# cling # To try out my bullshit implementations
|
||||||
# doxygen # Generate docs + graphs
|
# doxygen # Generate docs + graphs
|
||||||
|
|
||||||
# Libraries
|
# 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;
|
config.allowUnfree = true;
|
||||||
overlays = [devshell.overlays.default];
|
overlays = [devshell.overlays.default];
|
||||||
};
|
};
|
||||||
# TODO: Custom LaTeX "distribution"? With curated packages?
|
|
||||||
|
latexPython = pkgs.python311.withPackages (p:
|
||||||
|
with p; [
|
||||||
|
rich
|
||||||
|
pygments
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
devShell = pkgs.devshell.mkShell {
|
devShell = pkgs.devshell.mkShell {
|
||||||
name = "LaTeX Environment";
|
name = "LaTeX Environment";
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
inkscape
|
||||||
|
latexPython
|
||||||
texlab
|
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.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
@ -15,22 +15,39 @@
|
|||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
overlays = [devshell.overlay];
|
overlays = [devshell.overlays.default];
|
||||||
};
|
};
|
||||||
|
|
||||||
myPython = pkgs.python310.withPackages (p:
|
python-with-packages = pkgs.python311.withPackages (p:
|
||||||
with p; [
|
with p; [
|
||||||
|
# Basic
|
||||||
rich
|
rich
|
||||||
numpy
|
# python-dotenv
|
||||||
scipy
|
|
||||||
matplotlib
|
# Math
|
||||||
|
# numpy
|
||||||
|
# matplotlib
|
||||||
|
# sympy
|
||||||
|
|
||||||
|
# Web
|
||||||
|
# flask
|
||||||
|
# flask-sqlalchemy
|
||||||
|
# sqlalchemy
|
||||||
|
|
||||||
|
# Discord
|
||||||
|
# discordpy
|
||||||
|
# pynacl # discordpy voice support
|
||||||
|
|
||||||
|
# Scraping
|
||||||
|
# beautifulsoup4
|
||||||
|
# requests
|
||||||
]);
|
]);
|
||||||
in {
|
in {
|
||||||
devShell = pkgs.devshell.mkShell {
|
devShell = pkgs.devshell.mkShell {
|
||||||
name = "";
|
name = "Python Environment";
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
myPython
|
python-with-packages
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use $1 for positional args
|
# 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.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
@ -18,7 +18,7 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true; # For clion
|
config.allowUnfree = true; # For clion
|
||||||
overlays = [
|
overlays = [
|
||||||
devshell.overlay
|
devshell.overlays.default
|
||||||
rust-overlay.overlays.default
|
rust-overlay.overlays.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -29,13 +29,11 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
devShell = pkgs.devshell.mkShell {
|
devShell = pkgs.devshell.mkShell {
|
||||||
name = "Rust development shell";
|
name = "Rust Environment";
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
rust-stable
|
rust-stable
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
|
|
||||||
jetbrains.clion
|
|
||||||
];
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
@ -53,11 +51,11 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
commands = [
|
commands = [
|
||||||
{
|
# {
|
||||||
name = "ide";
|
# name = "ide";
|
||||||
help = "Run clion for project";
|
# help = "Run clion for project";
|
||||||
command = "clion &>/dev/null ./ &";
|
# 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