added vim config and autoupdate
This commit is contained in:
parent
00605c831c
commit
893d652eb4
2 changed files with 87 additions and 11 deletions
|
|
@ -29,6 +29,7 @@
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(self: super: {
|
(self: super: {
|
||||||
gitea = unstable.gitea;
|
gitea = unstable.gitea;
|
||||||
|
htop = unstable.htop;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -48,15 +49,14 @@
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
#vim
|
||||||
wget
|
wget
|
||||||
htop
|
htop
|
||||||
git
|
git
|
||||||
screen
|
screen
|
||||||
rxvt-unicode
|
rxvt-unicode
|
||||||
|
(import ./vim.nix)
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
|
@ -74,13 +74,7 @@
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
system.stateVersion = "21.05";
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "21.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [ mc1 ];
|
nameservers = [ mc1 ];
|
||||||
|
|
@ -101,7 +95,7 @@
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#memoryMax = 8000000000;
|
#memoryMax = 8000000000;
|
||||||
memoryPercent = 500;
|
memoryPercent = 250;
|
||||||
algorithm = "lzo-rle";
|
algorithm = "lzo-rle";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -138,6 +132,11 @@
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
allowReboot = true;
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
|
|
||||||
|
|
@ -171,7 +170,12 @@
|
||||||
};
|
};
|
||||||
ssh.clonePort = 2222;
|
ssh.clonePort = 2222;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
72
vim.nix
Normal file
72
vim.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
packages.vim = with pkgs.vimPlugins; {
|
||||||
|
start = [
|
||||||
|
airline
|
||||||
|
syntastic
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue