From 160f829729376d9cc41a36b23feb5b5760fdd59d Mon Sep 17 00:00:00 2001 From: mc-fucker Date: Thu, 4 Nov 2021 13:04:03 +0100 Subject: [PATCH] some more splitting --- configuration.nix | 9 +----- hardware-configuration.nix | 5 ++++ vim.nix | 60 +------------------------------------- vimrc | 57 ++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 67 deletions(-) create mode 100644 vimrc diff --git a/configuration.nix b/configuration.nix index 73d55b9..fe9f896 100644 --- a/configuration.nix +++ b/configuration.nix @@ -34,15 +34,8 @@ ]; imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + [ ./hardware-configuration.nix ]; - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only - - # networking.hostName = "nixos"; # Define your hostname. time.timeZone = "Europe/Berlin"; networking.useDHCP = false; diff --git a/hardware-configuration.nix b/hardware-configuration.nix index e589968..c146240 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -18,5 +18,10 @@ }; swapDevices = [ ]; + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; + networking.hostName = "mc3"; + networking.domain = "mc-fucker.cool"; } diff --git a/vim.nix b/vim.nix index 29609ee..52fae11 100644 --- a/vim.nix +++ b/vim.nix @@ -3,65 +3,7 @@ with import {}; vim_configurable.customize { name = "vim"; vimrcConfig = { - customRC = '' - set laststatus=2 - - set number - set encoding=utf8 - set ffs=unix,dos,mac - set nobackup - set nowb - set noswapfile - - set shiftwidth=4 - set tabstop=4 - set expandtab - - set lcs=trail:·,tab:»· - set list - set ruler - "set so=7 - set ignorecase - set smartcase - set incsearch - set hlsearch - set showmatch - set modeline - - set ai "Auto indent - set si "Smart indent - set nowrap "Don't wrap lines - syntax on - "colors peaksea - - set statusline+=%#warningmsg# - set statusline+=%{SyntasticStatuslineFlag()} - set statusline+=%* - - let g:syntastic_always_populate_loc_list = 1 - let g:syntastic_auto_loc_list = 1 - let g:syntastic_check_on_open = 1 - let g:syntastic_check_on_wq = 1 - let g:syntastic_cpp_compiler = 'g++-5' - let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++ -I. -I..' - if ! has("gui_running") - set t_Co=256 - endif - set wildmenu - set showcmd - " Let's save undo info! - if !isdirectory($HOME."/.cache") - call mkdir($HOME."/.cache", "", 0770) - endif - if !isdirectory($HOME."/.cache/vim") - call mkdir($HOME."/.cache/vim", "", 0770) - endif - if !isdirectory($HOME."/.cache/vim/undo-dir") - call mkdir($HOME."/.cache/vim/undo-dir", "", 0700) - endif - set undodir=~/.cache/vim/undo-dir - set undofile - ''; + customRC = builtins.readFile ./vimrc; packages.vim = with pkgs.vimPlugins; { start = [ airline diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..35e6cd0 --- /dev/null +++ b/vimrc @@ -0,0 +1,57 @@ +set laststatus=2 + +set number +set encoding=utf8 +set ffs=unix,dos,mac +set nobackup +set nowb +set noswapfile + +set shiftwidth=4 +set tabstop=4 +set expandtab + +set lcs=trail:·,tab:»· +set list +set ruler +set so=7 +set ignorecase +set smartcase +set incsearch +set hlsearch +set showmatch +set modeline + +set ai "Auto indent +set si "Smart indent +set nowrap "Don't wrap lines +syntax on +"colors peaksea + +set statusline+=%#warningmsg# +set statusline+=%{SyntasticStatuslineFlag()} +set statusline+=%* + +let g:syntastic_always_populate_loc_list = 1 +let g:syntastic_auto_loc_list = 1 +let g:syntastic_check_on_open = 1 +let g:syntastic_check_on_wq = 1 +let g:syntastic_cpp_compiler = 'g++-5' +let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++ -I. -I..' +if ! has("gui_running") + set t_Co=256 +endif +set wildmenu +set showcmd +" Let's save undo info! +if !isdirectory($HOME."/.cache") + call mkdir($HOME."/.cache", "", 0770) +endif +if !isdirectory($HOME."/.cache/vim") + call mkdir($HOME."/.cache/vim", "", 0770) +endif +if !isdirectory($HOME."/.cache/vim/undo-dir") + call mkdir($HOME."/.cache/vim/undo-dir", "", 0700) +endif +set undodir=~/.cache/vim/undo-dir +set undofile