From a4f1a2add6952df64120338828ce50805de2c94f Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 17 Oct 2019 01:01:20 +0200 Subject: [PATCH] Add vim and a separate nix file for its configuration --- configuration.nix | 6 ++++++ vim.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 vim.nix diff --git a/configuration.nix b/configuration.nix index d84fc07..0fcd86f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -18,6 +18,7 @@ ''; environment.systemPackages = with pkgs; [ raspberrypi-tools + vim ]; # File systems configuration for using the installer's partition layout @@ -48,4 +49,9 @@ openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDG7JtfAqcbZV28wkNTfSWSqTOo5buH+dyT0w6SlTqq+KFh5DxREB0yGuM1UfjLpyLQ0XI7UbhCwNG28Li4yv/hwPGq63TF1kl+w4sjQKFn4bOUv1NvsfSN3oTamjfYoVsrapCiXqOvZkzEKMF47MSwOfPkqZ6ihU5V3INA0IZbl1Ri+r9MsIzvY76ZHBiF6rVqQJjdXVDbcLMViOrM56FpyK+ICo+uTkErsEbYFwevVTv9memOh778RRPesBobpZjggWOI4HXXxqk35myInYjHve9K4ox6YZMjwnwnEftONr2HyoBBcBNT+wWd1jtYxCoCWQ3vVkn4LGBDOQ3+HKb4rT3JxI66VfFyQWGJPdgJL5/ZNRlBqA7CpAtE7JaR6l7d3mCCoGW2B0atWiEXecwb8dz4CzzYm1r9Wz27L74OtPzUqcV7mQjCVDcnRsY/MtfhzyWzhB3tujVqnRtF3VrFSrm0YXS1ZWG4dltX1cfgud8s8XwwBKcFw5NdCrVxq3nRMNlGcSqbXC+RnrkK/i6ciAriZdXgFrmnBl+6qEmqIO15u2IPvDhnQs18DzRkHnPQegphhHhHix5aaqNbLfSRZNCTQaqE774X+0kuU/RWylI4muIyf4k9x+et4txeU2OC6l0W0LMpbsELzXIRr/ZBFrGHbE7/KLi8HNiAJ0KmAQ== coolneng@monolith" ]; }; + # Import other configuration modules + imports = + [ + ./vim.nix + ]; } diff --git a/vim.nix b/vim.nix new file mode 100644 index 0000000..84013c4 --- /dev/null +++ b/vim.nix @@ -0,0 +1,33 @@ +# Vim configuration +programs.vim.defaultEditor = true; + +with import {}; + +vim_configurable.customize { + name = "vim"; + vimrcConfig.customRC = '' + ""Basic stuff + set number + set ttyfast + ""Colors + colorscheme synthwave + set t_Co=256 + ""Misc + set clipboard=unnamedplus + set nofoldenable + ""Spaces instead of tabs + set expandtab + set tabstop=2 + set shiftwidth=2 + ""Don't litter swp files everywhere + set backupdir=~/.cache + set directory=~/.cache + ""Keybindings + set pastetoggle= + let mapleader="\" + nnoremap n :noh + "Move the current line up or down + nnoremap k :m-2== + nnoremap j :m+== + ''; +}