Skip to content

repldriven/config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

config

Personal configuration files managed with Nix flakes and Homebrew.

Nix Flakes

llama.cpp (nix/llama/)

Dev shell for building llama.cpp from source. Provides CMake, Vulkan SDK (headers, loader, glslang, shaderc), OpenSSL, and Go.

cd nix/llama && nix develop

Neovim (nix/nvim/)

Dev shell with Neovim and a full set of supporting tools:

  • Editor: Neovim, tmux, lazygit, ripgrep, fd
  • Languages: Rust (cargo, rustc, rust-analyzer), Python (debugpy), Node.js, Lua
  • LSPs: lua-language-server, nil (Nix), yaml-language-server, marksman (Markdown), dockerfile-language-server
  • Formatters: stylua, nixfmt, prettier, shfmt
  • Linters: shellcheck, markdownlint-cli, hadolint
  • DevOps: kubectl, k9s, buf, gh
  • AI: ollama, opencode
cd nix/nvim && nix develop

Usage with direnv

These flakes work well with direnv to automatically activate environments when you enter a directory.

Workspace-level environment

Place this config repo alongside your projects and point your workspace .envrc at the Neovim flake:

~/workspace/
├── config/          # this repo
├── project-a/
├── project-b/
└── .envrc
# ~/workspace/.envrc
if has nix; then
  use flake ./config/nix/nvim
fi

Now entering ~/workspace/ (or any subdirectory without its own .envrc) loads Neovim, LSPs, formatters, and all the dev tools.

Project-level overrides

Individual projects can define their own .envrc and flake.nix to extend the workspace environment with project-specific dependencies:

# ~/workspace/project-a/.envrc
if has nix; then
  use flake .
fi

The project's flake.nix can take the config flake as an input and merge its packages with project-specific ones:

# ~/workspace/project-a/flake.nix
{
  description = "Project A";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    config.url = "path:../config/nix/nvim";
  };

  outputs = { self, nixpkgs, flake-utils, config }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          config.allowUnsupportedSystem = true;
        };
        configShell = config.devShells.${system}.default;
      in
      {
        devShells.default = pkgs.mkShell {
          buildInputs = configShell.buildInputs ++ [
            pkgs.jdk21
            pkgs.clojure
            pkgs.clojure-lsp
          ];
        };
      }
    );
}

This inherits all the Neovim tooling from the config flake and adds project-specific packages on top. direnv activates the closest .envrc it finds, so entering project-a/ uses the project flake while stepping back out to ~/workspace/ restores the workspace environment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors