diff --git a/nix/darwin-configuration.nix b/nix/darwin-configuration.nix new file mode 100644 index 0000000..025d562 --- /dev/null +++ b/nix/darwin-configuration.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: + +{ + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + environment.systemPackages = + [ + pkgs.firefox + ]; + + # Use a custom configuration.nix location. + # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix + # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; + + # Auto upgrade nix package and the daemon service. + services.nix-daemon.enable = true; + # nix.package = pkgs.nix; + + # Create /etc/bashrc that loads the nix-darwin environment. + programs.zsh.enable = true; # default shell on catalina + # programs.fish.enable = true; + + # Used for backwards compatibility, please read the changelog before changing. + # $ darwin-rebuild changelog + system.stateVersion = 4; +} diff --git a/nix/home.nix b/nix/home.nix index f92c2cf..19e9a18 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -59,7 +59,6 @@ in { nnn tree ripgrep - vlc zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting @@ -68,6 +67,7 @@ in { ] else [ calibre slack + vlc ]); programs.direnv = { @@ -121,7 +121,7 @@ in { initExtra = mkForce ('' export LOCALE_ARCHIVE="/usr/lib/locale/locale-archive" - export NIX_PATH=$HOME/.nix-defexpr/channels:$NIX_PATH + export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels:$NIX_PATH export EDITOR=vim source $HOME/.nix-profile/etc/profile.d/nix.sh @@ -154,11 +154,6 @@ in { eval "$(direnv hook zsh)" ''); - shellAliases = { - n = "neuron new"; - ns = "neuron search -a"; - }; - oh-my-zsh = { enable = true; theme = "typewritten"; @@ -204,11 +199,16 @@ in { plugins = with pkgs.vimPlugins; [ vim-sensible vim-startify + + vim-elixir alchemist-vim vimtex - vim-elixir vim-elm-syntax vim-nix + vim-javascript + vim-json + vim-jsx-pretty + vim-airline rainbow vim-signify @@ -216,7 +216,6 @@ in { vim-surround fugitive easymotion - tagbar vinegar undotree vim-test @@ -244,10 +243,14 @@ in { \ 'javascript.jsx': ['prettier'], \ 'javascriptreact': ['prettier'], \ 'typescriptreact': ['prettier'], - \ 'ruby': [], + \ 'ruby': ['sorbet'], \ 'rust': ['rustfmt'], \ 'elixir': ['mix_format'] \} + let g:ale_linters_ignore = { + \ 'javascript': ['tsserver'], + \ 'javascriptreact': ['tsserver'], + \} " Easymotion map / (easymotion-sn) @@ -282,11 +285,13 @@ in { \ 'javascript.jsx': ['flow', 'lsp'], \ 'javascriptreact': ['flow', 'lsp'], \ 'rust': ['rustup', 'run', 'stable', 'rls'], + \ 'ruby': ['bundle', 'exec', 'srb', 'tc', '--lsp', '.'], \ } let g:LanguageClient_rootMarkers = { \ 'elm': ['elm.json'], \ 'typescriptreact': ['tsconfig.json'], + \ 'ruby': ['Gemfile'], \ } let g:LanguageClient_loggingFile = expand('~/.local/share/nvim/LanguageClient.log') @@ -398,7 +403,7 @@ in { defaultCommand = "rg --no-ignore --follow --files --hidden --smart-case --glob \\\"!.git/*\\\""; }; - services.lorri.enable = !pkgs.stdenv.isDarwin; + # services.lorri.enable = !pkgs.stdenv.isDarwin; # Let Home Manager install and manage itself. programs.home-manager.enable = true;