diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 837bc57d..4947e40e 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -154,6 +154,7 @@ in # quick ssh sm = "ssh mossnet.lan"; ss = "ssh sealight.xyz"; + sc = "ssh lakhwara.com"; # cube }; }; diff --git a/users/anish/default.nix b/users/anish/default.nix index 4ec5f91c..1a43a8eb 100644 --- a/users/anish/default.nix +++ b/users/anish/default.nix @@ -1,10 +1,9 @@ -{hmUsers, ...}: +{ hmUsers, ... }: { #home-manager.users = { inherit (hmUsers) anish; }; users.users.anish = { - hashedPassword = "MVHHpy9gbe3ow"; description = "Personal user for Anish"; isNormalUser = true; extraGroups = [ "wheel" "audio" ]; diff --git a/users/profiles/nvim/default.nix b/users/profiles/nvim/default.nix index be91f7c3..04370244 100644 --- a/users/profiles/nvim/default.nix +++ b/users/profiles/nvim/default.nix @@ -1,164 +1,3 @@ -{ pkgs, ... }: -let - customPlugins = { - vim-zettel = pkgs.vimUtils.buildVimPlugin { - name = "vim-zettel"; - src = pkgs.fetchFromGitHub { - owner = "michal-h21"; - repo = "vim-zettel"; - rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d"; - sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4="; - }; - }; - lsp-format = pkgs.vimUtils.buildVimPlugin { - name = "lsp-format"; - src = pkgs.fetchFromGitHub { - owner = "lukas-reineke"; - repo = "lsp-format.nvim"; - rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff"; - sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4="; - }; - }; - vim-tidal = pkgs.vimUtils.buildVimPluginFrom2Nix { - name = "vim-tidal"; - src = pkgs.fetchgit { - url = "https://github.com/tidalcycles/vim-tidal"; - # version 1.4.6 - rev = "52134979252757a5736ae09cb9fc6ae3cc04daef"; - sha256 = "c12v9+s/JspQ9Am291RFI7eg0UAeXGDvJ5lK+7ukOb0="; - }; - dependencies = [ ]; - }; - tidal = pkgs.stdenv.mkDerivation { - name = "tidal"; - src = pkgs.fetchgit { - url = "https://github.com/tidalcycles/vim-tidal"; - # version 1.4.6 - rev = "52134979252757a5736ae09cb9fc6ae3cc04daef"; - sha256 = "c12v9+s/JspQ9Am291RFI7eg0UAeXGDvJ5lK+7ukOb0="; - }; - preConfigure = '' - mkdir -p $out/bin - substituteInPlace Makefile \ - --replace '/usr/local' "$out" \ - ''; - }; - }; - - my-python-packages = python-packages: with python-packages; [ - tasklib - pynvim - six - python-lsp-server - pylsp-mypy - pylint - black - # other python packages you want - ]; - python-with-my-packages = pkgs.python3.withPackages my-python-packages; -in -{ - environment.variables.EDITOR = "nvim"; - environment.shellAliases = { - k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD"; - kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD"; - }; - - #environment.systemPackages = with customPlugins; [ tidal ]; - home-manager.users.anish.programs.neovim = { - enable = true; - - extraConfig = '' - set tabstop=2 - set showmatch - set shiftwidth=2 - set noexpandtab - set autoindent - set undofile - set signcolumn=auto:4 - - " set foldmethod=indent " fold based on indent - set number - set nocompatible - set relativenumber - set showtabline=2 - set noexpandtab - set autowriteall - syntax on - set list lcs=tab:\|\ - filetype plugin on - - set termguicolors - colorscheme ayu-mirage - - " set spell - set spelllang=en_gb - set ignorecase - set smartcase - set incsearch - " if hidden is not set, TextEdit might fail. - set hidden - " Some servers have issues with backup files, see #649 - set nobackup - set nowritebackup - " Better display for messages - set cmdheight=2 - " You will have bad experience for diagnostic messages when it's default 4000. - set updatetime=300 - " don't give |ins-completion-menu| messages. - set shortmess+=c - " always show signcolumns - set signcolumn=yes - - " window - nmap wh :topleft vnew - nmap wl :botright vnew - nmap wk :topleft new - nmap wj :botright new - - " tabs - nmap rt :retab! - vmap rt :retab! - - let mapleader = "\" - let maplocalleader = "," - - " moving splits with vim movements. - :tnoremap h - :tnoremap j - :tnoremap k - :tnoremap l - :inoremap h - :inoremap j - :inoremap k - :inoremap l - :nnoremap h - :nnoremap j - :nnoremap k - :nnoremap l - :nnoremap "=strftime("%Y-%m-%d %H:%M") - :inoremap =strftime("%Y-%m-%d %H:%M") - :inoremap =strftime("%H:%M") - - " tidal nvim terminal - let g:tidal_target = "terminal" - - " telescope - " Find files using Telescope command-line sugar. - nnoremap ff Telescope find_files - nnoremap fg Telescope live_grep - nnoremap fb Telescope buffers - nnoremap fh Telescope help_tags - nnoremap ft Telescope tags - - " exit normal mode in terminal - :tnoremap - - " Sexp in Conjure (since it's fennel) - " let g:sexp_filetypes = [ "fennel" ] - - let g:rainbow_active = 0 - autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll " general commands map t :NERDTreeToggle