{ config, pkgs, lib, ... }: { config = lib.mkMerge [(lib.mkIf (pkgs.stdenv.buildPlatform == pkgs.stdenv.hostPlatform) { environment.systemPackages = with pkgs; [ meld nixfmt-rfc-style stdenv.cc stdenv.cc.bintools # bins but not manpages included in stdenv.cc ]; programs.git.config.merge.tool = "meld"; programs.git.config.core.editor = "kak"; programs.neovim = { enable = true; defaultEditor = true; vimAlias = true; viAlias = true; configure = { # lmao customRC = '' ${builtins.readFile ./dotfiles/nvim-init.vim} lua << EOF ${builtins.readFile ./dotfiles/nvim-init.lua} EOF ''; packages.myVimPackage = with pkgs.vimPlugins; { start = [ #rust-vim vim-tmux-navigator popup-nvim vim-sleuth nvim-lspconfig #rust-tools-nvim tabby-nvim nvim-lint nvim-cmp nvim-web-devicons cmp-nvim-lsp lsp-status-nvim #flatten-nvim telescope-nvim telescope-frecency-nvim telescope-file-browser-nvim telescope-fzy-native-nvim nvim-treesitter.withAllGrammars #sweetie-nvim tokyonight-nvim vim-nix csharpls-extended-lsp-nvim ]; opt = []; }; }; }; systemd.services.nvim-server = { enable = false; wantedBy = [ "multi-user.target" ]; description = "Neovim Server"; script = '' export PATH="/run/current-system/sw/bin:/run/wrappers/bin:$PATH" nvim --listen /tmp/nvim.sock --headless ''; serviceConfig = { User = "audrey"; Type = "simple"; Restart = "always"; }; environment = { LOG_CHANNEL_ID = "532689319350108160"; CHANNEL_COUNT = "4"; DELAY_SECONDS = "5"; DEBUG = "0"; }; }; }) (lib.mkIf (pkgs.stdenv.buildPlatform != pkgs.stdenv.hostPlatform) { programs.vim = { enable = true; defaultEditor = true; package = pkgs.vim.customize { vimrcConfig.customRC = '' set mouse= set hlsearch nnoremap :noh ''; }; }; programs.git.config.core.editor = "vim"; environment.systemPackages = with pkgs; [ clang bintools ]; }) ]; }