diff --git a/flake.lock b/flake.lock index b3a2c29..b3f9910 100755 --- a/flake.lock +++ b/flake.lock @@ -68,6 +68,42 @@ "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": { "locked": { "lastModified": 1751127166, @@ -129,6 +165,21 @@ "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": { "locked": { "lastModified": 1751432711, @@ -160,6 +211,21 @@ "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": { "locked": { "lastModified": 1751741127, @@ -177,6 +243,22 @@ } }, "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": { "lastModified": 1744868846, "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", @@ -192,6 +274,28 @@ "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": { "inputs": { "flake-compat": [ @@ -225,6 +329,7 @@ "lanzaboote": "lanzaboote", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", + "nvf": "nvf", "secrets": "secrets", "sops-nix": "sops-nix" } @@ -269,7 +374,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1751606940, @@ -284,6 +389,36 @@ "repo": "sops-nix", "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", diff --git a/flake.nix b/flake.nix index 5df0fa9..b301d5e 100755 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,7 @@ url = "git+ssh://git@docker.local:222/fern/secrets?ref=main"; flake = false; }; + nvf.url = "github:notashelf/nvf"; # Neovim. # Packages. fluffychat-2_0_0.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0 @@ -24,6 +25,7 @@ lanzaboote, nixos-hardware, sops-nix, + nvf, fluffychat-2_0_0, feishin-0_17_0, ... @@ -71,6 +73,7 @@ modules = [ + nvf.nixosModules.default ./suites/common.nix ./suites/${suite}.nix ./hosts/${suite}/${hostname}.nix diff --git a/suites/common.nix b/suites/common.nix index 9ecb45d..8f70ee6 100644 --- a/suites/common.nix +++ b/suites/common.nix @@ -98,20 +98,42 @@ with lib; # Install some packages. programs.git.enable = true; - programs.neovim = { + programs.nvf = { enable = true; - defaultEditor = true; # Use neovim as default terminal editor. - configure = { - customRC = '' - set expandtab - set shiftwidth=2 - set tabstop=8 - set softtabstop=2 - set number - colorscheme kanagawa-dragon - ''; - packages.myVimPackage = with pkgs.vimPlugins; { - start = [ kanagawa-nvim ]; + defaultEditor = true; + + settings.vim = { + autocomplete.blink-cmp.enable = true; + undoFile.enable = true; + lineNumberMode = "number"; + + options = rec { + shiftwidth = 2; + tabstop = shiftwidth; + softtabstop = shiftwidth; + 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") + ''; + }; }; }; };