Compare commits
No commits in common. "2572513c44f5119256c531805b6349a83fde7247" and "8457523518b658fe8ac862cb1c5a9fca41fee4b0" have entirely different histories.
2572513c44
...
8457523518
@ -35,14 +35,6 @@ in
|
|||||||
VISUAL = "nvim";
|
VISUAL = "nvim";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
git
|
|
||||||
gnumake
|
|
||||||
gcc
|
|
||||||
ripgrep
|
|
||||||
fd
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.neovim =
|
programs.neovim =
|
||||||
let
|
let
|
||||||
toLua = str: ''
|
toLua = str: ''
|
||||||
@ -58,39 +50,39 @@ in
|
|||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
# vimdiffAlias = true;
|
# vimdiffAlias = true;
|
||||||
|
|
||||||
# plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
# {
|
{
|
||||||
# plugin = dracula-nvim;
|
plugin = dracula-nvim;
|
||||||
# config = "colorscheme dracula";
|
config = "colorscheme dracula";
|
||||||
# }
|
}
|
||||||
# {
|
{
|
||||||
# plugin = comment-nvim;
|
plugin = comment-nvim;
|
||||||
# config = toLua ''require("Comment").setup()'';
|
config = toLua ''require("Comment").setup()'';
|
||||||
# }
|
}
|
||||||
|
|
||||||
# # nix file support
|
# nix file support
|
||||||
# vim-nix
|
vim-nix
|
||||||
|
|
||||||
# # Syntax highlighting
|
# Syntax highlighting
|
||||||
# (nvim-treesitter.withPlugins (p: [
|
(nvim-treesitter.withPlugins (p: [
|
||||||
# p.tree-sitter-nix
|
p.tree-sitter-nix
|
||||||
# p.tree-sitter-vim
|
p.tree-sitter-vim
|
||||||
# p.tree-sitter-bash
|
p.tree-sitter-bash
|
||||||
# p.tree-sitter-lua
|
p.tree-sitter-lua
|
||||||
# p.tree-sitter-python
|
p.tree-sitter-python
|
||||||
# p.tree-sitter-json
|
p.tree-sitter-json
|
||||||
# p.tree-sitter-cpp
|
p.tree-sitter-cpp
|
||||||
# p.tree-sitter-rust
|
p.tree-sitter-rust
|
||||||
# ]))
|
]))
|
||||||
# ];
|
];
|
||||||
|
|
||||||
# extraConfig = ''
|
extraConfig = ''
|
||||||
# set clipboard=unnamedplus
|
set clipboard=unnamedplus
|
||||||
# '';
|
'';
|
||||||
|
|
||||||
# extraLuaConfig = ''
|
extraLuaConfig = ''
|
||||||
# vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
# '';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
|
||||||
# as well as the libraries available from your flake's inputs.
|
|
||||||
lib,
|
|
||||||
# You also have access to your flake's inputs.
|
|
||||||
inputs,
|
|
||||||
|
|
||||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
|
||||||
# programmatically or you may add the named attributes as arguments here.
|
|
||||||
pkgs,
|
|
||||||
stdenv,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
pkgs.writeShellApplication {
|
|
||||||
name = "conda-direnv";
|
|
||||||
|
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
conda
|
|
||||||
yq
|
|
||||||
];
|
|
||||||
|
|
||||||
text = ''
|
|
||||||
if [ ! -f environment.yml ]; then
|
|
||||||
echo "environment.yml does not exist! Exiting..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
ENV_NAME=$(${pkgs.yq}/bin/yq ".name" environment.yml -r)
|
|
||||||
if [ "$ENV_NAME" == "" ] || [ "$ENV_NAME" == "null" ]; then
|
|
||||||
echo "Property \"name\" not in environment.yml or empty! Exiting..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo Welcome to your conda environment "$ENV_NAME"! Activating...
|
|
||||||
|
|
||||||
condanew() {
|
|
||||||
conda env create -f environment.yml -n $ENV_NAME
|
|
||||||
conda activate $ENV_NAME
|
|
||||||
}
|
|
||||||
|
|
||||||
exec ${pkgs.conda}/bin/conda-shell
|
|
||||||
conda activate $ENV_NAME || condanew
|
|
||||||
|
|
||||||
echo "Environment active! To update it, run:"
|
|
||||||
echo -e "\tconda env update -f environment.yml -n $ENV_NAME"
|
|
||||||
|
|
||||||
"$SHELL" # needs to be last line so that conda-shell actually enters a shell
|
|
||||||
'';
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user