Skip to content

[BUG] Home-manager not working on nixos-24.05 #2473

@mfiumara

Description

@mfiumara
Field Description
Plugin <any>
Nixpkgs <24.05>
Home Manager <stable>
  • I have read the FAQ and my bug is not listed there.

Description

Hi, I am new to nixOS but I cannot seem to get this working. I have added nixvim pinned to 24.05 to my configuration and then whenever I try to set load any plugin it cannot be loaded, for example lualine:

Error detected while processing /home/mattiaf/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/mattiaf/.config/nvim/init.lua:6: module 'lualine' not found:
        no field package.preload['lualine']
        no file '/nix/store/rwf92hm6drz4rgng9r2hsviqsvpwdjb7-luajit-2.1.1693350652-env/share/lua/5.1/lualine.lua'
        no file '/nix/store/rwf92hm6drz4rgng9r2hsviqsvpwdjb7-luajit-2.1.1693350652-env/share/lua/5.1/lualine/init.lua'
        no file '/nix/store/rwf92hm6drz4rgng9r2hsviqsvpwdjb7-luajit-2.1.1693350652-env/lib/lua/5.1/lualine.so'

Also colorschemes do not load when set in my configuration.

Minimal, Reproducible Example (MRE)

My /etc/nixos/configuration.nix:

{ config, pkgs, ... }:

let
  nixvim = import (builtins.fetchGit {
    url = "https://github.com/nix-community/nixvim";
    ref = "nixos-24.05";
  });
in
{
  imports =
    [ # Include the results of the hardware scan.
      /etc/nixos/hardware-configuration.nix
      <home-manager/nixos>
    ];
  # Define home-manager settings inside configuration as module
  home-manager.users.mattiaf = { pkgs, ... }: {
    imports = [ nixvim.homeManagerModules.nixvim ];
    programs = {
     nixvim = {
       enable = true;
       plugins = {
         lualine.enable = true;
	 nvim-tree.enable = true;
       };
     };
    };
 
    home.stateVersion = "24.05";
  };

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions