mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
move flake to own repository
This commit is contained in:
commit
84b5cd816c
55 changed files with 13637 additions and 0 deletions
38
templates/cpp_flake.nix
Normal file
38
templates/cpp_flake.nix
Normal 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
46
templates/cu_flake.nix
Normal 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
28
templates/py_flake.nix
Normal 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
36
templates/rust_flake.nix
Normal 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";
|
||||
|
||||
# ...
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
29
templates/tex_standard.tex
Normal file
29
templates/tex_standard.tex
Normal 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
6
templates/toolchain.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[toolchain]
|
||||
channel = "stable"
|
||||
components = [
|
||||
"rust-src"
|
||||
# ...
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue