move flake to own repository

This commit is contained in:
Swarsel 2023-12-11 02:57:34 +01:00
commit 84b5cd816c
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
55 changed files with 13637 additions and 0 deletions

38
templates/cpp_flake.nix Normal file
View file

@ -0,0 +1,38 @@
# flake.nix
{
description = "C/C++ environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
llvm = pkgs.llvmPackages_latest;
in {
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
gcc
#builder
cmake
gnumake
#headers
clang-tools
#lsp
llvm.libstdcxxClang
#tools
cppcheck
valgrind
doxygen
];
hardeningDisable = ["all"];
# direnv does not allow aliases, use scripts as a workaround
shellHook = ''
PATH_add ~/.dotfiles/scripts/devShell
'';
# ...
};
};
}

46
templates/cu_flake.nix Normal file
View file

@ -0,0 +1,46 @@
# flake.nix
{
description = "CUDA environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";
pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; };
llvm = pkgs.llvmPackages_latest;
in {
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
# gcc
#builder
# cmake
# gnumake
#headers
clang-tools
#lsp
# llvm.libstdcxxClang
# cudaPackages.cuda_nvcc
#tools
cppcheck
valgrind
doxygen
cudatoolkit
(pkgs.python3.withPackages (python-pkgs: [
python-pkgs.numpy
python-pkgs.pandas
python-pkgs.scipy
python-pkgs.matplotlib
python-pkgs.requests
python-pkgs.debugpy
python-pkgs.python-lsp-server
]))
];
hardeningDisable = ["all"];
# ...
};
};
}

28
templates/py_flake.nix Normal file
View file

@ -0,0 +1,28 @@
{
description = "Python Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.${system}.default = pkgs.mkShell {
packages = [
(pkgs.python3.withPackages (python-pkgs: [
python-pkgs.numpy
python-pkgs.pandas
python-pkgs.scipy
python-pkgs.matplotlib
python-pkgs.requests
python-pkgs.debugpy
python-pkgs.flake8
python-pkgs.gnureadline
python-pkgs.python-lsp-server
]))
];
};
};
}

36
templates/rust_flake.nix Normal file
View file

@ -0,0 +1,36 @@
# flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = {self, nixpkgs, rust-overlay, ...}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [rust-overlay.overlays.default];
};
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./toolchain.toml;
in {
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
cargo
clippy
rustc
rustfmt
toolchain
rust-analyzer-unwrapped
rust-analyzer
];
env = {
RUST_BACKTRACE = "full";
};
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
# ...
};
};
}

View file

@ -0,0 +1,29 @@
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{verbatim}
\usepackage{listings}
\author{Leon Schwarzäugl}
\date{\today}
\title{--NAME--}
\hypersetup{
pdfauthor={Leon Schwarzäugl},
pdftitle={--METADATA-NAME--},
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 30.0.50 (Org mode 9.6.12)},
pdflang={English}}
\begin{document}
\end{document}

6
templates/toolchain.toml Normal file
View file

@ -0,0 +1,6 @@
[toolchain]
channel = "stable"
components = [
"rust-src"
# ...
]