add nixhsells and nvim config

This commit is contained in:
grimhilt 2023-10-29 14:51:29 +01:00
parent db7149f1b5
commit 680f6101e9
8 changed files with 78 additions and 5 deletions

View File

@ -15,6 +15,8 @@ in
libinput libinput
clang-tools_15 clang-tools_15
valgrind valgrind
xorg.xcbutil
xorg.xcbutilkeysyms
]; ];
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
pkg-config pkg-config

11
.config/nixshell/caml.nix Normal file
View File

@ -0,0 +1,11 @@
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
ocaml
pkg-config
opam
xorg.libX11
];
}

View File

@ -1,8 +1,10 @@
let pkgs = import <nixpkgs> { overlays = [ (import ./cypress-overlay.nix) ]; }; let pkgs = import <nixpkgs> { overlays = [ (import ./cypress-overlay.nix) ]; };
unstable = import <unstable> {};
in pkgs.mkShell { in pkgs.mkShell {
name = "matrix-shell"; name = "matrix-shell";
buildInputs = with pkgs; [ buildInputs = with pkgs; [
yarn yarn
nodejs
docker docker
act act
gtk2 gtk2
@ -26,14 +28,14 @@ in pkgs.mkShell {
xorg.libxcb libsecret libuuid at-spi2-atk at-spi2-core libdbusmenu xorg.libxcb libsecret libuuid at-spi2-atk at-spi2-core libdbusmenu
libdrm libdrm
mesa # required for libgbm mesa # required for libgbm
cypress unstable.cypress
]; ];
shellHook = '' shellHook = ''
export NAME="matrix-shell" export NAME="matrix-shell"
export NODE_OPTIONS=--openssl-legacy-provider
export CYPRESS_INSTALL_BINARY=0 export CYPRESS_INSTALL_BINARY=0
export CYPRESS_RUN_BINARY=${pkgs.cypress}/bin/Cypress export CYPRESS_RUN_BINARY=${unstable.cypress}/bin/Cypress
''; '';
# export NODE_OPTIONS=--openssl-legacy-provider
} }
#https://gist.github.com/r-k-b/2485f977b476aa3f76a47329ce7f9ad4?permalink_comment_id=4402925 #https://gist.github.com/r-k-b/2485f977b476aa3f76a47329ce7f9ad4?permalink_comment_id=4402925

View File

@ -4,8 +4,8 @@ let
in in
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
unstable.mongodb #unstable.mongodb
mongosh #mongosh
]; ];
shellHook = '' shellHook = ''
''; '';

View File

@ -0,0 +1,50 @@
let
pkgs = import <nixpkgs> {};
my-python-packages = ps: with ps; [
pandas
requests
tkinter
gunicorn
python-vlc
mpv
(
buildPythonPackage rec {
pname = "tkVideo";
version = "0.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-nxSWlqwC7rlPJbJQGtlb1AP75omUZWK2sNVgQJYVGfU=";
};
doCheck = false;
propagatedBuildInputs = [
imageio
];
}
)
opencv4
#(
# buildPythonPackage rec {
# pname = "opencv-python-headless";
# version = "4.8.0.76";
# src = fetchPypi {
# inherit pname version;
# sha256 = "sha256-vBVyYYfa4m2KCHd/r2vHHTjyDHhcECZ39Yug6TUAOvs=";
# };
# doCheck = false;
# propagatedBuildInputs = [
# ];
# }
#)
pillow
flask
flask_sqlalchemy
flask_login
flask-cors
imageio
imageio-ffmpeg
pyavm
];
my-python = pkgs.python310.withPackages my-python-packages;
in
my-python.env

View File

@ -8,6 +8,7 @@ in
cargo cargo
libressl libressl
rustfmt rustfmt
mdbook
]; ];
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
pkg-config pkg-config

View File

@ -19,6 +19,9 @@ vim.o.scrolloff = 8
-- --
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
--clear hightlight
vim.keymap.set("n", "<leader>h", ":noh<CR>", {noremap=true})
--move line shortcut --move line shortcut
vim.keymap.set("n", "<M-j>", ":m +1<CR>==", {noremap = true}) vim.keymap.set("n", "<M-j>", ":m +1<CR>==", {noremap = true})
vim.keymap.set("n", "<M-k>", ":m -2<CR>==", {noremap = true}) vim.keymap.set("n", "<M-k>", ":m -2<CR>==", {noremap = true})

View File

@ -2,6 +2,7 @@ local mark = require("harpoon.mark")
local ui = require("harpoon.ui") local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file) vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<leader>q", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu) vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<M-a>", function() ui.nav_file(1) end) vim.keymap.set("n", "<M-a>", function() ui.nav_file(1) end)
@ -9,3 +10,6 @@ vim.keymap.set("n", "<M-z>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<M-e>", function() ui.nav_file(3) end) vim.keymap.set("n", "<M-e>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<M-r>", function() ui.nav_file(4) end) vim.keymap.set("n", "<M-r>", function() ui.nav_file(4) end)
vim.keymap.set("n", "<M-t>", function() ui.nav_file(5) end) vim.keymap.set("n", "<M-t>", function() ui.nav_file(5) end)
vim.keymap.set("n", "<M-q>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<M-w>", function() ui.nav_file(2) end)