Something went wrong. Try again.
0xda157's nixvim config
Something went wrong. Try again.
nixvim-cfg flake.nix
3.2 kB · 126 lines
Nix
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127{ description = "0xda157's nixvim config";
inputs = { nixpkgs.follows = "nixvim/nixpkgs";
systems.url = "github:nix-systems/default";
flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; };
nixvim = { url = "github:nix-community/nixvim"; inputs = { systems.follows = "systems"; flake-parts.follows = "flake-parts"; }; }; };
outputs = { self, nixpkgs, systems, flake-parts, nixvim, }@inputs: flake-parts.lib.mkFlake { inherit inputs; } ( { lib, ... }: { systems = import systems;
imports = [ nixvim.flakeModules.default ];
nixvim = { packages.enable = true; checks.enable = true; };
flake.nixvimModules = { base.imports = [ # keep-sorted start ./modules/config.nix ./modules/keymaps.nix ./modules/plugins ./modules/plugins/alpha ./modules/plugins/completion ./modules/plugins/gitsigns ./modules/plugins/indent-blankline ./modules/plugins/lualine ./modules/plugins/neo-tree ./modules/plugins/telescope ./modules/plugins/treesitter # keep-sorted end ]; full.imports = [ # keep-sorted start block=yes prefix_order=self,./ self.nixvimModules.base ./modules/plugins/conform ./modules/plugins/lint ./modules/plugins/lsp # keep-sorted end ]; };
perSystem = { system, pkgs, config, ... }: { nixvimConfigurations = lib.mapAttrs ( _: modules: inputs.nixvim.lib.evalNixvim { inherit system modules; } ) { nixvim = [ self.nixvimModules.full ]; nixvim-minimal = [ self.nixvimModules.base ]; };
packages.default = config.packages.nixvim;
formatter = pkgs.treefmt.withConfig { runtimeInputs = with pkgs; [ # keep-sorted start deadnix keep-sorted nixfmt # keep-sorted end ];
settings = { on-unmatched = "info"; tree-root-file = "flake.nix";
formatter = { # keep-sorted start block=yes deadnix = { command = "deadnix"; includes = [ "*.nix" ]; }; keep-sorted = { command = "keep-sorted"; includes = [ "*" ]; }; nixfmt = { command = "nixfmt"; includes = [ "*.nix" ]; }; # keep-sorted end }; }; }; }; } );}