nvf for neovim

This commit is contained in:
Fern Garden 2025-07-09 23:22:58 +08:00
parent 0ae5bd3bcd
commit 8d4a3f9769
3 changed files with 174 additions and 14 deletions

137
flake.lock generated
View file

@ -68,6 +68,42 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fluffychat-2_0_0": { "fluffychat-2_0_0": {
"locked": { "locked": {
"lastModified": 1751127166, "lastModified": 1751127166,
@ -129,6 +165,21 @@
"type": "github" "type": "github"
} }
}, },
"mnw": {
"locked": {
"lastModified": 1748710831,
"narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "mnw",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1751432711, "lastModified": 1751432711,
@ -160,6 +211,21 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1748740939,
"narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1751741127, "lastModified": 1751741127,
@ -177,6 +243,22 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"lastModified": 1750215678,
"narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5395fb3ab3f97b9b7abca147249fa2e8ed27b192",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1744868846, "lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
@ -192,6 +274,28 @@
"type": "github" "type": "github"
} }
}, },
"nvf": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-utils": "flake-utils",
"mnw": "mnw",
"nixpkgs": "nixpkgs_3",
"systems": "systems_2"
},
"locked": {
"lastModified": 1752001027,
"narHash": "sha256-JgP8lW4QBr9v/U4ETaIOMvGCd/DAA1AjZ1lqjIwfWno=",
"owner": "notashelf",
"repo": "nvf",
"rev": "c4d80273aaefeadaad96db97d077c647942b0e96",
"type": "github"
},
"original": {
"owner": "notashelf",
"repo": "nvf",
"type": "github"
}
},
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -225,6 +329,7 @@
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nvf": "nvf",
"secrets": "secrets", "secrets": "secrets",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
@ -269,7 +374,7 @@
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1751606940, "lastModified": 1751606940,
@ -284,6 +389,36 @@
"repo": "sops-nix", "repo": "sops-nix",
"type": "github" "type": "github"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -11,6 +11,7 @@
url = "git+ssh://git@docker.local:222/fern/secrets?ref=main"; url = "git+ssh://git@docker.local:222/fern/secrets?ref=main";
flake = false; flake = false;
}; };
nvf.url = "github:notashelf/nvf"; # Neovim.
# Packages. # Packages.
fluffychat-2_0_0.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0 fluffychat-2_0_0.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0
@ -24,6 +25,7 @@
lanzaboote, lanzaboote,
nixos-hardware, nixos-hardware,
sops-nix, sops-nix,
nvf,
fluffychat-2_0_0, fluffychat-2_0_0,
feishin-0_17_0, feishin-0_17_0,
... ...
@ -71,6 +73,7 @@
modules = modules =
[ [
nvf.nixosModules.default
./suites/common.nix ./suites/common.nix
./suites/${suite}.nix ./suites/${suite}.nix
./hosts/${suite}/${hostname}.nix ./hosts/${suite}/${hostname}.nix

View file

@ -98,20 +98,42 @@ with lib;
# Install some packages. # Install some packages.
programs.git.enable = true; programs.git.enable = true;
programs.neovim = { programs.nvf = {
enable = true; enable = true;
defaultEditor = true; # Use neovim as default terminal editor. defaultEditor = true;
configure = {
customRC = '' settings.vim = {
set expandtab autocomplete.blink-cmp.enable = true;
set shiftwidth=2 undoFile.enable = true;
set tabstop=8 lineNumberMode = "number";
set softtabstop=2
set number options = rec {
colorscheme kanagawa-dragon shiftwidth = 2;
''; tabstop = shiftwidth;
packages.myVimPackage = with pkgs.vimPlugins; { softtabstop = shiftwidth;
start = [ kanagawa-nvim ]; expandtab = true;
};
languages.nix = {
enable = true;
treesitter.enable = true;
lsp = {
enable = true;
server = "nixd";
};
format = {
enable = true;
type = "alejandra";
};
};
extraPlugins = {
kanagawa-nvim = {
package = pkgs.vimPlugins.kanagawa-nvim;
setup = ''
require("kanagawa").load("dragon")
'';
};
}; };
}; };
}; };