Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/flake-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [ "24.11", "unstable" ]
target: [ "25.05", "unstable" ]

steps:
- uses: actions/checkout@v4
Expand All @@ -30,9 +30,8 @@ jobs:
if: matrix.target != 'unstable'
run: |
nix build -L \
--override-input nixpkgs github:NixOS/nixpkgs/nixos-24.11 \
--override-input home-manager github:nix-community/home-manager/release-24.11 \
--override-input nixvim github:nix-community/nixvim/nixos-24.11
--override-input nixpkgs github:NixOS/nixpkgs/nixos-25.05 \
--override-input nixvim github:nix-community/nixvim/nixos-25.05

- name: build unstable
if: matrix.target == 'unstable'
Expand Down
20 changes: 12 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

flake-utils.url = "github:numtide/flake-utils";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "nixvim/systems";
};

nixvim = {
url = "github:nix-community/nixvim";
inputs = {
nixpkgs.follows = "nixpkgs";

# https://github.com/nix-community/nixvim/blob/main/flake.nix#L12-L34
nuschtosSearch.follows = "";
};
Expand Down
21 changes: 9 additions & 12 deletions modules/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{ lib, options, pkgs, ... }:

let
colorizer = if lib.versionAtLeast lib.version "25.05pre" then "colorizer" else "nvim-colorizer";
in
{
imports = [
./cmp.nix
Expand Down Expand Up @@ -71,12 +68,12 @@ in
secure = true;
};

plugins = let
crates = if options.plugins?crates then "crates" else "crates-nvim";
in {
diagnostic.settings.virtual_text = true;

plugins = {
bufferline.enable = true;
commentary.enable = true;
"${crates}".enable = true;
crates.enable = true;
fidget.enable = true;
gitsigns.enable = true;
indent-blankline.enable = true;
Expand All @@ -90,17 +87,17 @@ in
};
# https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options
sections = {
lualine_b = [ {
lualine_b = [{
sources = [ "nvim_diagnostic" "nvim_lsp" ];
} ];
lualine_c = [ {
}];
lualine_c = [{
path = 1;
} ];
}];
};
};
};
nvim-autopairs.enable = true; # brackets, html, ...
${colorizer}.enable = true;
colorizer.enable = true;
rainbow-delimiters.enable = true;
ts-context-commentstring.enable = true; # set comment string dynamically
vim-matchup.enable = true; # extends % key with comments
Expand Down
8 changes: 0 additions & 8 deletions modules/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,6 @@ in
action = "implementation";
desc = "Goto Implementation";
};
"<leader>k" = {
action = "hover";
desc = "Hover";
};
"<leader>ls" = {
action = "signature_help";
desc = "Signature Help";
};
};
};
};
Expand Down
13 changes: 2 additions & 11 deletions modules/treesitter.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{ lib, options, ... }:

let
# TODO: drop with 25.05
hasDependencies = lib.versionAtLeast lib.version "25.05";
in
lib.optionalAttrs hasDependencies {
{
dependencies = {
gcc.enable = false;
nodejs.enable = false;
tree-sitter.enable = false;
};
} // {

plugins.treesitter = {
enable = true;
# exclude some big (above 10 MB) and rarely used languages
Expand All @@ -22,11 +18,6 @@ lib.optionalAttrs hasDependencies {
) options.plugins.treesitter.grammarPackages.default;

settings.highlight.enable = true;
} // lib.optionalAttrs (!hasDependencies) {
# we are not installing packages by hand
gccPackage = null;
nodejsPackage = null;
treesitterPackage = null;
};

# Enable automatically closing and renaming HTML tags
Expand Down
Loading