217 lines
6.3 KiB
Nix
Raw Normal View History

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
sile-flake.url = "github:sile-typesetter/sile";
durnitisp-flake.url = "github:zaphar/durnitisp";
runwhen-flake.url = "github:zaphar/runwhen";
agenix-flake.url = "github:ryantm/agenix";
nurl-flake.url = "github:nix-community/nurl";
nil-flake = {
url = "github:oxalica/nil";
#inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay-flake = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
jj-flake.url = "github:martinvonz/jj";
};
outputs = {
sile-flake,
runwhen-flake,
durnitisp-flake,
rust-overlay-flake,
jj-flake,
agenix-flake,
nil-flake,
nurl-flake,
2023-07-19 21:50:11 -04:00
... # We don't use the self or nixpkgs args here so we just glob it.
}: {
systemModule = system: let
runwhen = runwhen-flake.defaultPackage."${system}";
durnitisp = durnitisp-flake.defaultPackage."${system}";
2023-06-26 17:33:26 -04:00
rust-overlay = rust-overlay-flake.overlays.default;
sile = sile-flake.defaultPackage.${system};
jj = jj-flake.packages."${system}".jujutsu;
age = agenix-flake.packages."${system}".default;
nil-pkg = nil-flake.packages."${system}".default;
nurl = nurl-flake.packages."${system}".default;
2023-08-22 17:53:41 -04:00
in { config, pkgs, ... }: let
nvim-treesitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix {
2023-09-11 10:26:01 -04:00
inherit (pkgs.tree-sitter) buildGrammar;
inherit (pkgs) fetchFromGitHub;
2023-08-22 17:53:41 -04:00
};
2023-09-11 10:26:01 -04:00
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
inherit (pkgs.vimUtils) buildVimPlugin;
inherit (pkgs) fetchFromGitHub;
};
2023-08-22 17:53:41 -04:00
expected-parsers = (pkgs.lib.attrVals [
"tree-sitter-rust"
"tree-sitter-lua"
"tree-sitter-toml"
"tree-sitter-yaml"
"tree-sitter-json"
"tree-sitter-html"
"tree-sitter-css"
"tree-sitter-nix"
"tree-sitter-latex"
"tree-sitter-ocaml"
"tree-sitter-tlaplus"
"tree-sitter-julia"
] pkgs.tree-sitter.builtGrammars) ++ [nvim-treesitter-csharp];
in {
imports = [
agenix-flake.nixosModules.default
2023-06-26 17:33:26 -04:00
./program-neovim.nix
];
config = {
nixpkgs.overlays = [
rust-overlay
];
environment.variables = {
EDITOR="nvim";
PAGER="less -R";
2023-07-20 10:48:23 -04:00
OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/OmniSharp";
};
2023-07-14 16:21:54 -04:00
environment.etc."nvim.lua" = {
source = ./init.lua;
};
programs = with pkgs; {
neovim.enable = true;
2023-06-26 19:18:28 -04:00
neovim.vimAlias = true;
neovim.viAlias = true;
neovim.configure = {
2023-08-17 15:34:36 -04:00
customRC = "lua << EOF
${builtins.readFile ./init.lua}
EOF";
2023-09-11 10:26:01 -04:00
packages.myVimPackage = {
start = (with pkgs.vimPlugins; [
2023-07-14 16:21:54 -04:00
nvim-tree-lua
nvim-lspconfig
packer-nvim
vim-lsp
vim-vsnip
nvim-cmp
cmp-nvim-lua
cmp-nvim-lsp
cmp-vsnip
cmp-buffer
cmp-path
cmp-nvim-lsp-signature-help
nvim-dap # Debug Adapter Protocol support
#nvim-dap-ui
2023-07-14 16:21:54 -04:00
vimagit
hoon-vim
2023-08-22 17:53:41 -04:00
(nvim-treesitter.withPlugins (_: expected-parsers))
nvim-treesitter-context
nvim-treesitter-parsers.ini
nvim-treesitter-parsers.terraform
2023-07-14 16:21:54 -04:00
omnisharp-extended-lsp-nvim
#neotest-dotnet
nix-develop-nvim
trouble-nvim
nightfox-nvim
2023-07-19 18:23:57 -04:00
melange-nvim
2023-07-30 15:15:42 -04:00
julia-vim # TODO I should get julia language server support set up instead.
2023-08-04 15:41:25 -04:00
telescope-nvim
2023-08-14 11:43:36 -04:00
telescope-lsp-handlers-nvim
2023-08-04 15:41:25 -04:00
plenary-nvim
2023-09-22 11:06:19 -04:00
vim-dadbod
vim-dadbod-ui
vim-dadbod-completion
2023-09-11 10:26:01 -04:00
]) ++ [ possession-nvim ];
};
};
2023-07-14 16:21:54 -04:00
zsh.enable = true; # default shell on catalina
2023-06-26 19:18:28 -04:00
# This is a total hack but we don't want the default clobbering it which it does if it's an empty string or null
zsh.promptInit = "#noop";
2023-06-26 17:33:26 -04:00
zsh.interactiveShellInit = (builtins.readFile ./.zshrc);
};
environment.systemPackages = (with pkgs; [
terraform # TODO(jeremy): Replace with opentofu when that is an option.
2023-09-22 11:06:19 -04:00
postgresql
2023-09-21 09:42:15 -04:00
oha
nodejs
2023-07-16 22:21:45 -04:00
nodePackages.typescript-language-server
tmux
gnumake
# TODO find a version of the julia package that will install
# on darwin and add it as an overlay
python3
emacs
git
mercurial
bash
curl
wget
jq
spacebar
coreutils
watch
iterm2
go
htop
colima
2023-07-31 10:34:26 -04:00
ghidra
2023-07-11 11:31:13 -04:00
#podman-desktop # Broken on darwin right now with electron build issues.
# Note that podman expects qemu to be installed in order to use the podman machine setup.
2023-07-13 08:06:14 -04:00
qemu
podman
lima
rlwrap
docker-client
google-cloud-sdk
nil-pkg
alloy6
2023-07-19 21:50:11 -04:00
omnisharp-roslyn
2023-06-26 19:59:14 -04:00
(tlaplus.override {
adoptopenjdk-bin = jdk;
})
lua-language-server
jdk
plantuml-c4
texlive.combined.scheme-basic
nssTools
mkcert
octave
kubo
dotnet-sdk_7
netcoredbg
2023-06-28 15:00:07 -04:00
powershell
2023-07-14 16:21:54 -04:00
rust-analyzer
2023-07-20 14:09:01 -04:00
datasette
2023-07-30 15:15:42 -04:00
ocaml
opam
2023-08-04 15:41:25 -04:00
ocamlformat
# TODO(jwall): I include these initially for nvim telescope
ripgrep
fd
lldb
llvmPackages.bintools-unwrapped
# TODO add sonic-pi here if it supports the arch
2023-08-04 15:41:25 -04:00
]) ++ (with pkgs.ocamlPackages; [
2023-08-04 15:24:39 -04:00
dune_3
2023-08-04 15:41:25 -04:00
odoc
ocaml-lsp
merlin
utop
]) ++ [
sile
runwhen
durnitisp
jj
age
nurl
];
};
};
};
}