diff --git a/configuration.nix b/configuration.nix index 5d04cf0..c8d6b8e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -29,6 +29,7 @@ nixpkgs.overlays = [ (self: super: { gitea = unstable.gitea; + htop = unstable.htop; }) ]; @@ -48,15 +49,14 @@ i18n.defaultLocale = "en_GB.UTF-8"; - # List packages installed in system profile. To search, run: - # $ nix search wget 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 htop git screen rxvt-unicode + (import ./vim.nix) ]; # Some programs need SUID wrappers, can be configured further or are @@ -74,13 +74,7 @@ # Or disable the firewall altogether. # networking.firewall.enable = false; - # This value determines the NixOS release from which the default - # 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? + system.stateVersion = "21.05"; networking = { nameservers = [ mc1 ]; @@ -101,7 +95,7 @@ zramSwap = { enable = true; #memoryMax = 8000000000; - memoryPercent = 500; + memoryPercent = 250; algorithm = "lzo-rle"; }; @@ -137,6 +131,11 @@ users.defaultUserShell = pkgs.zsh; security.sudo.wheelNeedsPassword = false; + + system.autoUpgrade = { + enable = true; + allowReboot = true; + }; services = { openssh.enable = true; @@ -171,7 +170,12 @@ }; ssh.clonePort = 2222; }; + }; + virtualisation = { + docker = { + enable = true; + }; }; } diff --git a/vim.nix b/vim.nix new file mode 100644 index 0000000..29609ee --- /dev/null +++ b/vim.nix @@ -0,0 +1,72 @@ +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 + ''; + packages.vim = with pkgs.vimPlugins; { + start = [ + airline + syntastic + ]; + }; + }; +}