Skip to content

alcestide/nixvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALK's Nixvim Configuration

License Written in Nix NixOS Unstable GitHub last commit Free

Testing

You can try out my configuration by running the following command in your shell:

nix run github:alcestide/nixvim

Alternatively, you could:

git clone https://github.com/alcestide/nixvim

and then run nix run . inside the cloned directory.

Screenshot_20241027-125629

Screenshot_20241027-125520

Screenshot_20241027-125535

Installation

To make this configuration persistent, you can either use flakes (easier) or the standalone method. Here’s how:

Flakes

  • In your flake.nix, create inside inputs:
    nixvim = {
      url = "github:alcestide/nixvim";
    };

Then simply add it to your packages like this:

    inputs.nixvim.packages."x86_64-linux".default

Standalone

  • Create a variable for your Nixvim config directory (I put mine inside the same directory of configuration.nix).
  • Create another variable and assign to it nixvim.legacyPackages."${pkgs.stdenv.hostPlatform.system}" (in this case the variable is named "alknix", but you can call it as you like).
  • Pass the Nixvim config as a module to the makeNixvimWithModule function as shown below:
let
	nixvim-config = import ./nixvim/config;
alknixvim = nixvim.legacyPackages.x86_64-linux.makeNixvimWithModule {
	inherit pkgs;
	module = nixvim-config;};
in

Add the newly created package to your systemPackages list:

environment.systemPackages = [
    alknixvim
];

Finally, rebuild your NixOS configuration by running: sudo nixos-rebuild switch This should set everything up. If you encounter issues:

  • Check for version mismatches between nixvim and nixpkgs inside your flake.nix. Make sure they're both the same version!
  • Review the logs for any errors that might indicate what’s going wrong.