diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 888d9cd..e4c0d8b 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -20,13 +20,24 @@ wsl.defaultUser = "nixos"; wsl.nativeSystemd = false; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # for vscode remote server + + # TODO: move to home manager (?) + programs = { + direnv = { + enable = true; + # enableFishIntegration = true; + nix-direnv.enable = true; + }; + }; + # 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 = "23.11"; # Did you read the comment? + system.stateVersion = "24.05"; # Did you read the comment? users.users.dth = { isNormalUser = true; @@ -34,6 +45,11 @@ initialPassword = "test"; }; + nixpkgs.config.allowUnfree = true; + environment.variables = { + DBT_USER = "DNTH"; + }; + environment.systemPackages = with pkgs; [ # tmux # activated in tmux.nix # vim # using neovim in stead @@ -41,19 +57,21 @@ git ripgrep + wget # for vscode-server + busybox # useful programs e.g. tree, unzip etc # make default.nix in python project folders instead of using a top-level python environment manager # pyenv # poetry - fastfetch - neofetch + neofetch # system info # gimp # bloat + # blender # bloat + # inkscape # bloat + cowsay lolcat ]; - - } diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 3efcd29..ac1942c 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -14,24 +14,41 @@ colorscheme gruvbox - set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» - set clipboard+=unnamedplus + " relative line numbering when leaving insert mode + set relativenumber + autocmd InsertEnter * :set number norelativenumber + autocmd InsertLeave * :set nonumber relativenumber - " Replace-all is aliased to S. + " netrw (dir listing) settings + let g:netrw_liststyle = 3 + let g:netrw_banner = 0 + let g:netrw_browse_split = 3 + let g:netrw_winsize = 25 " % of page + + set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + set clipboard+=unnamedplus + + " Replace-all is aliased to S. nnoremap S :%s//g + + " spellcheck + set spell spelllang=en_us + setlocal spell! spelllang=en_us ''; # vimPlugins inspired from Alexnortung # https://discourse.nixos.org/t/neovim-no-longer-uses-config-or-plugins/13399/4 packages.nix = with pkgs.vimPlugins; { start = [ - vim-surround # Shortcuts for setting () {} etc. + vim-surround # shortcuts for setting () {} etc. # coc-nvim coc-git coc-highlight coc-python coc-rls coc-vetur coc-vimtex coc-yaml coc-html coc-json # auto completion - vim-nix # nix highlight - vimtex # latex stuff - fzf-vim # fuzzy finder through vim - nerdtree # file structure inside nvim - rainbow # Color parenthesis - gruvbox-nvim # theme + vim-nix # nix highlight + vimtex # latex stuff + fzf-vim # fuzzy finder through vim + nerdtree # file structure inside nvim + rainbow # color parenthesis + gruvbox-nvim # theme + goyo-vim # write prose + limelight-vim # prose paragraph highlighter ]; opt = []; }; diff --git a/nixos/tmux.nix b/nixos/tmux.nix index ce1c107..1d37111 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -4,7 +4,7 @@ programs.tmux = { enable = true; clock24 = true; - escapeTime = 20; + # escapeTime = 20; extraConfig = '' # remap prefix from ^+B to alt-f unbind C-b @@ -27,7 +27,7 @@ bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" # reduce escape time - set-option -sg escape-time 20 + set -sg escape-time 20 # pane movement shortcuts bind h select-pane -L