2023-06-26 16:53:29 -04:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-01-28 23:46:33 -05:00
|
|
|
# Default to sane nixpkgs versions
|
2024-06-01 12:21:14 -04:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/24.05";
|
2024-01-29 00:04:22 -05:00
|
|
|
unstable.url = "nixpkgs";
|
2024-06-01 12:21:14 -04:00
|
|
|
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
|
2024-01-29 21:49:43 -05:00
|
|
|
#lean4-flake = {
|
|
|
|
# url = "github:leanprover/lean4/v4.4.0";
|
|
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
#};
|
2024-01-28 23:46:33 -05:00
|
|
|
darwin = {
|
|
|
|
url = "github:lnl7/nix-darwin";
|
|
|
|
# ensure that darwinSystem uses our nixpkgs version
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
|
|
|
};
|
2023-06-26 16:53:29 -04:00
|
|
|
sile-flake.url = "github:sile-typesetter/sile";
|
|
|
|
durnitisp-flake.url = "github:zaphar/durnitisp";
|
2023-09-27 13:39:06 -04:00
|
|
|
runwhen-flake.url = "github:zaphar/runwhen";
|
2023-06-26 16:53:29 -04:00
|
|
|
agenix-flake.url = "github:ryantm/agenix";
|
2023-09-27 13:39:06 -04:00
|
|
|
nurl-flake.url = "github:nix-community/nurl";
|
2023-09-11 16:39:59 -04:00
|
|
|
nil-flake = {
|
|
|
|
url = "github:oxalica/nil";
|
|
|
|
};
|
2024-06-04 20:26:07 -04:00
|
|
|
clio-flake = {
|
|
|
|
url = "github:zaphar/clio";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-06-26 16:53:29 -04:00
|
|
|
rust-overlay-flake = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-05-16 12:57:25 -05:00
|
|
|
|
|
|
|
neovim-flake = {
|
|
|
|
url = "github:neovim/neovim/stable?dir=contrib";
|
|
|
|
# NOTE(jeremy): Currently this needs a newer nixpkgs version
|
|
|
|
#inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-01-05 15:28:39 -05:00
|
|
|
harpoon-src = {
|
|
|
|
url = "github:ThePrimeagen/harpoon/harpoon2";
|
|
|
|
flake = false;
|
|
|
|
};
|
2024-05-16 15:49:23 -05:00
|
|
|
neogit-src = {
|
|
|
|
url = "github:NeogitOrg/neogit";
|
|
|
|
flake = false;
|
|
|
|
};
|
2024-01-28 17:16:20 -05:00
|
|
|
d2-vim-src = {
|
|
|
|
url = "github:terrastruct/d2-vim";
|
|
|
|
flake = false;
|
|
|
|
};
|
2024-01-05 16:07:20 -05:00
|
|
|
# We need to pin to this version of treesitter because it breaks after this revision
|
|
|
|
treesitter-context = {
|
|
|
|
url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23";
|
|
|
|
flake = false;
|
|
|
|
};
|
2024-01-09 08:30:42 -05:00
|
|
|
roslyn-lsp = {
|
2024-05-17 09:31:58 -05:00
|
|
|
url = "github:zaphar/roslyn.nvim/main";
|
2024-01-09 08:30:42 -05:00
|
|
|
flake = false;
|
|
|
|
};
|
2024-02-23 11:58:30 -05:00
|
|
|
heracles-flake.url = "github:zaphar/Heracles";
|
2023-06-26 16:53:29 -04:00
|
|
|
};
|
2024-01-28 23:46:33 -05:00
|
|
|
|
2023-06-26 16:53:29 -04:00
|
|
|
outputs = {
|
2024-01-28 23:46:33 -05:00
|
|
|
darwin,
|
2023-06-26 16:53:29 -04:00
|
|
|
sile-flake,
|
|
|
|
runwhen-flake,
|
|
|
|
durnitisp-flake,
|
|
|
|
rust-overlay-flake,
|
|
|
|
agenix-flake,
|
2023-09-11 16:39:59 -04:00
|
|
|
nil-flake,
|
2023-09-27 13:39:06 -04:00
|
|
|
nurl-flake,
|
2024-01-05 15:28:39 -05:00
|
|
|
harpoon-src,
|
2024-05-16 15:49:23 -05:00
|
|
|
neogit-src,
|
2024-01-28 17:16:20 -05:00
|
|
|
d2-vim-src,
|
2024-01-05 16:07:20 -05:00
|
|
|
treesitter-context,
|
2024-01-09 08:30:42 -05:00
|
|
|
roslyn-lsp,
|
2024-01-29 21:49:43 -05:00
|
|
|
#lean4-flake,
|
2024-01-29 00:04:22 -05:00
|
|
|
unstable,
|
2024-02-23 11:58:30 -05:00
|
|
|
heracles-flake,
|
2024-05-16 12:57:25 -05:00
|
|
|
neovim-flake,
|
2024-06-04 20:26:07 -04:00
|
|
|
clio-flake,
|
2023-07-19 21:50:11 -04:00
|
|
|
... # We don't use the self or nixpkgs args here so we just glob it.
|
2024-01-28 23:46:33 -05:00
|
|
|
}:
|
|
|
|
rec {
|
2024-01-05 15:28:39 -05:00
|
|
|
vimModule = system: let
|
2023-09-11 16:39:59 -04:00
|
|
|
nil-pkg = nil-flake.packages."${system}".default;
|
2024-01-05 15:28:39 -05:00
|
|
|
in
|
2024-01-28 23:46:33 -05:00
|
|
|
{ config, pkgs, ...}: let
|
2023-09-11 10:26:01 -04:00
|
|
|
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
|
|
|
|
inherit (pkgs.vimUtils) buildVimPlugin;
|
|
|
|
inherit (pkgs) fetchFromGitHub;
|
2023-12-08 18:03:17 -05:00
|
|
|
};
|
2024-01-28 17:16:20 -05:00
|
|
|
harpoon-nvim = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
pname = "harpoon";
|
|
|
|
version = "2024-01-28";
|
|
|
|
src = harpoon-src;
|
|
|
|
};
|
2024-05-16 15:49:23 -05:00
|
|
|
neogit-nvim = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
pname = "neogit";
|
|
|
|
version = "2024-05-16";
|
|
|
|
src = neogit-src;
|
|
|
|
};
|
2024-01-28 17:16:20 -05:00
|
|
|
d2-vim = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
pname = "d2-nvim";
|
|
|
|
version = "2024-01-28";
|
|
|
|
src = d2-vim-src;
|
2023-09-11 10:26:01 -04:00
|
|
|
};
|
2024-01-05 16:12:25 -05:00
|
|
|
nvim-treesitter-context = pkgs.vimUtils.buildVimPlugin {
|
2024-01-05 16:07:20 -05:00
|
|
|
name = "nvim-treesitter-context";
|
|
|
|
src = treesitter-context;
|
|
|
|
};
|
2024-01-09 08:30:42 -05:00
|
|
|
roslyn-nvim = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "roslyn-nvim";
|
|
|
|
src = roslyn-lsp;
|
|
|
|
};
|
2024-05-16 12:57:25 -05:00
|
|
|
nvim = neovim-flake.packages."${system}".neovim;
|
2024-01-05 15:28:39 -05:00
|
|
|
# TODO(jwall): When this actually builds we should use it.
|
|
|
|
#nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix {
|
|
|
|
# inherit (pkgs.tree-sitter) buildGrammar;
|
|
|
|
# inherit (pkgs) fetchFromGitHub;
|
|
|
|
#};
|
|
|
|
in {
|
2023-06-26 16:53:29 -04:00
|
|
|
imports = [
|
2023-06-26 17:33:26 -04:00
|
|
|
./program-neovim.nix
|
2023-06-26 16:53:29 -04:00
|
|
|
];
|
|
|
|
config = {
|
|
|
|
environment.variables = {
|
|
|
|
EDITOR="nvim";
|
|
|
|
PAGER="less -R";
|
2024-01-05 15:28:39 -05:00
|
|
|
OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/OmniSharp";
|
2023-06-26 16:53:29 -04:00
|
|
|
};
|
2024-05-16 12:57:25 -05:00
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
custom-neovim = nvim;
|
|
|
|
})
|
|
|
|
];
|
2023-06-26 16:53:29 -04:00
|
|
|
programs = with pkgs; {
|
|
|
|
neovim.enable = true;
|
2023-06-26 19:18:28 -04:00
|
|
|
neovim.vimAlias = true;
|
|
|
|
neovim.viAlias = true;
|
2024-05-16 12:57:25 -05:00
|
|
|
neovim.package = pkgs.custom-neovim;
|
2023-06-26 16:53:29 -04:00
|
|
|
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
|
2023-11-30 20:09:48 -05:00
|
|
|
vim-ps1
|
2023-07-14 16:21:54 -04:00
|
|
|
vim-lsp
|
|
|
|
vim-vsnip
|
2023-07-24 15:42:28 -04:00
|
|
|
nvim-cmp
|
|
|
|
cmp-nvim-lua
|
|
|
|
cmp-nvim-lsp
|
|
|
|
cmp-vsnip
|
|
|
|
cmp-buffer
|
|
|
|
cmp-path
|
|
|
|
cmp-nvim-lsp-signature-help
|
2023-10-05 12:25:16 -04:00
|
|
|
nvim-dap # Debug Adapter Protocol support
|
|
|
|
#nvim-dap-ui
|
2023-07-14 16:21:54 -04:00
|
|
|
hoon-vim
|
2024-01-06 11:36:58 -05:00
|
|
|
nvim-treesitter
|
2024-01-29 16:29:10 -05:00
|
|
|
lean-nvim
|
2024-01-09 08:30:42 -05:00
|
|
|
roslyn-nvim
|
2023-08-22 17:53:41 -04:00
|
|
|
nvim-treesitter-context
|
2024-01-06 11:36:58 -05:00
|
|
|
nvim-treesitter-textobjects
|
2023-08-22 17:53:41 -04:00
|
|
|
nvim-treesitter-parsers.ini
|
2024-01-06 11:36:58 -05:00
|
|
|
nvim-treesitter-parsers.rust
|
|
|
|
nvim-treesitter-parsers.c
|
|
|
|
nvim-treesitter-parsers.c_sharp
|
|
|
|
nvim-treesitter-parsers.cpp
|
|
|
|
nvim-treesitter-parsers.clojure
|
|
|
|
nvim-treesitter-parsers.latex
|
2023-10-25 11:30:32 -04:00
|
|
|
nvim-treesitter-parsers.terraform
|
2023-11-22 18:08:31 -05:00
|
|
|
nvim-treesitter-parsers.hcl
|
2024-01-06 11:36:58 -05:00
|
|
|
nvim-treesitter-parsers.yaml
|
|
|
|
nvim-treesitter-parsers.lua
|
|
|
|
nvim-treesitter-parsers.vim
|
|
|
|
nvim-treesitter-parsers.go
|
|
|
|
nvim-treesitter-parsers.toml
|
|
|
|
nvim-treesitter-parsers.tlaplus
|
|
|
|
nvim-treesitter-parsers.typescript
|
|
|
|
nvim-treesitter-parsers.starlark
|
|
|
|
nvim-treesitter-parsers.python
|
|
|
|
nvim-treesitter-parsers.sql
|
|
|
|
nvim-treesitter-parsers.javascript
|
|
|
|
nvim-treesitter-parsers.ocaml
|
|
|
|
nvim-treesitter-parsers.haskell
|
|
|
|
nvim-treesitter-parsers.css
|
|
|
|
nvim-treesitter-parsers.promql
|
|
|
|
nvim-treesitter-parsers.nix
|
|
|
|
nvim-treesitter-parsers.hoon
|
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-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
|
2024-05-16 15:49:23 -05:00
|
|
|
]) ++ [ possession-nvim harpoon-nvim d2-vim neogit-nvim ];
|
2023-06-26 16:53:29 -04:00
|
|
|
};
|
|
|
|
};
|
2024-01-05 15:28:39 -05:00
|
|
|
};
|
|
|
|
environment.systemPackages = (with pkgs; [
|
|
|
|
terraform-ls
|
|
|
|
nodePackages.typescript-language-server
|
2024-02-12 15:52:42 -06:00
|
|
|
nodePackages.jsdoc
|
2024-01-05 15:28:39 -05:00
|
|
|
# TODO find a version of the julia package that will install
|
|
|
|
# on darwin and add it as an overlay
|
|
|
|
nil-pkg
|
|
|
|
lua-language-server
|
|
|
|
rust-analyzer
|
2024-06-01 12:21:14 -04:00
|
|
|
# TODO(jwall): This is no longer provided for darwin in nixpkgs
|
|
|
|
#dbeaver-bin
|
2024-01-05 15:28:39 -05:00
|
|
|
]);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
systemModule = system: let
|
|
|
|
runwhen = runwhen-flake.defaultPackage."${system}";
|
|
|
|
durnitisp = durnitisp-flake.defaultPackage."${system}";
|
|
|
|
rust-overlay = rust-overlay-flake.overlays.default;
|
|
|
|
sile = sile-flake.defaultPackage.${system};
|
|
|
|
age = agenix-flake.packages."${system}".default;
|
|
|
|
nurl = nurl-flake.packages."${system}".default;
|
2024-06-04 20:26:07 -04:00
|
|
|
clio = clio-flake.packages."${system}".default;
|
2024-01-29 00:04:22 -05:00
|
|
|
unstablePkgs = import unstable { inherit system; };
|
2024-01-29 21:49:43 -05:00
|
|
|
#lean4Pkg = lean4-flake.defaultPackage."${system}";
|
2024-01-28 23:46:33 -05:00
|
|
|
in { config, pkgs, ... }: let
|
2024-01-05 15:28:39 -05:00
|
|
|
d2-lang = pkgs.callPackage ./d2.nix {};
|
|
|
|
in {
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
agenix-flake.nixosModules.default
|
|
|
|
./program-neovim.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
2024-01-31 13:52:24 -05:00
|
|
|
(final: prev: {
|
|
|
|
# This is needed because the ccache used by lean4Pkg is broken
|
|
|
|
ccache = prev.ccache.override { doCheck = false; };
|
2024-02-23 11:58:30 -05:00
|
|
|
heracles = heracles-flake.packages."${system}".default;
|
2024-04-11 15:28:01 -04:00
|
|
|
durnitisp = durnitisp;
|
2024-06-04 20:26:07 -04:00
|
|
|
clio = clio;
|
2024-01-31 13:52:24 -05:00
|
|
|
})
|
|
|
|
rust-overlay
|
2024-01-05 15:28:39 -05:00
|
|
|
];
|
2023-07-14 16:21:54 -04:00
|
|
|
|
2024-01-28 23:46:33 -05:00
|
|
|
# TODO(jwall): This is needed for terraform
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
2024-01-05 15:28:39 -05:00
|
|
|
environment.etc."nvim.lua" = {
|
|
|
|
source = ./init.lua;
|
|
|
|
};
|
|
|
|
|
2024-01-21 17:51:44 -05:00
|
|
|
programs = {
|
|
|
|
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
|
2024-01-21 17:51:44 -05:00
|
|
|
promptInit = "#noop";
|
|
|
|
interactiveShellInit = (builtins.readFile ./.zshrc);
|
|
|
|
};
|
|
|
|
|
|
|
|
tmux = {
|
|
|
|
enable = true;
|
|
|
|
enableVim = true;
|
|
|
|
extraConfig = (builtins.readFile ./tmux.conf);
|
|
|
|
};
|
2023-06-26 16:53:29 -04:00
|
|
|
};
|
|
|
|
environment.systemPackages = (with pkgs; [
|
2024-01-29 00:34:48 -05:00
|
|
|
# TODO(jwall): This appears to be broken due to: https://github.com/NixOS/nixpkgs/issues/166205
|
|
|
|
# Should be fixed by: https://github.com/NixOS/nixpkgs/pull/282624
|
2024-01-29 21:49:43 -05:00
|
|
|
#isabelle
|
2024-01-31 13:52:24 -05:00
|
|
|
# Should be fixed by: https://github.com/NixOS/nixpkgs/pull/282624
|
2024-06-01 12:21:14 -04:00
|
|
|
#(lean4.override { stdenv = stdenv.override { allowedRequisites = null; cc = llvmPackages_11.clang; }; })
|
|
|
|
lean4
|
2024-01-28 23:46:33 -05:00
|
|
|
terraform # TODO(jeremy): Replace with opentofu when that is an option.
|
2023-12-05 06:47:34 -05:00
|
|
|
nomad
|
2023-09-21 09:42:15 -04:00
|
|
|
oha
|
2023-06-26 16:53:29 -04:00
|
|
|
nodejs
|
|
|
|
gnumake
|
|
|
|
# TODO find a version of the julia package that will install
|
|
|
|
# on darwin and add it as an overlay
|
2023-10-28 09:18:46 -04:00
|
|
|
python310
|
|
|
|
python310Packages.pip
|
2023-11-22 18:08:58 -05:00
|
|
|
python310Packages.virtualenv
|
2023-06-26 16:53:29 -04:00
|
|
|
emacs
|
|
|
|
git
|
|
|
|
mercurial
|
|
|
|
curl
|
|
|
|
wget
|
|
|
|
jq
|
2023-12-09 08:36:57 -05:00
|
|
|
trippy
|
2023-06-26 16:53:29 -04:00
|
|
|
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
|
2023-06-26 16:53:29 -04:00
|
|
|
lima
|
|
|
|
rlwrap
|
|
|
|
docker-client
|
|
|
|
google-cloud-sdk
|
2023-10-28 09:18:46 -04:00
|
|
|
awscli2
|
2023-06-26 16:53:29 -04:00
|
|
|
alloy6
|
2024-01-05 15:28:39 -05:00
|
|
|
tlaplus
|
2023-06-26 16:53:29 -04:00
|
|
|
jdk
|
2024-06-01 12:21:14 -04:00
|
|
|
# TODO(zaphar): d2 is broken in latest nixpkgs
|
|
|
|
#d2-lang
|
2023-06-26 16:53:29 -04:00
|
|
|
plantuml-c4
|
|
|
|
nssTools
|
2023-11-22 18:08:58 -05:00
|
|
|
nomad
|
2023-06-26 16:53:29 -04:00
|
|
|
mkcert
|
|
|
|
kubo
|
2024-03-05 12:36:45 -05:00
|
|
|
#netcoredbg
|
2023-06-28 15:00:07 -04:00
|
|
|
powershell
|
2024-06-01 11:31:11 -04:00
|
|
|
# NOTE(jwall): I include these initially for nvim telescope
|
2023-08-04 15:41:25 -04:00
|
|
|
ripgrep
|
|
|
|
fd
|
2023-06-26 16:53:29 -04:00
|
|
|
# TODO add sonic-pi here if it supports the arch
|
2024-01-05 15:28:39 -05:00
|
|
|
])
|
2024-01-28 23:46:33 -05: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
|
2024-01-05 15:28:39 -05:00
|
|
|
])
|
|
|
|
++ [
|
2023-06-26 16:53:29 -04:00
|
|
|
sile
|
|
|
|
runwhen
|
|
|
|
durnitisp
|
|
|
|
age
|
2023-09-27 13:39:06 -04:00
|
|
|
nurl
|
2023-06-26 16:53:29 -04:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-01-28 23:46:33 -05:00
|
|
|
|
|
|
|
darwinConfigurations."jeremys-mbp" = darwin.lib.darwinSystem rec {
|
|
|
|
system = "aarch64-darwin";
|
|
|
|
modules = [
|
|
|
|
(systemModule system)
|
|
|
|
(vimModule system)
|
2024-02-19 10:40:10 -05:00
|
|
|
./modules/darwin-monitor.nix
|
2024-06-01 10:10:32 -04:00
|
|
|
./modules/victoria-logs.nix
|
2024-06-01 13:02:27 -04:00
|
|
|
./modules/vector.nix
|
2024-01-28 23:46:33 -05:00
|
|
|
./darwin-configuration.nix
|
|
|
|
];
|
|
|
|
};
|
2023-06-26 16:53:29 -04:00
|
|
|
};
|
|
|
|
}
|