Flake not seeing nvf

I tried installing nvf, first as a home manager module, which worked, but I wanted it as a separate module.

My flake looks like this:

{
  description = "Ghil's very basic flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
    determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
    nvf.url = "github:notashelf/nvf";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { 
    self, 
    nixpkgs,
    home-manager,
    determinate,
    nvf,
    ...
  } @ inputs: {
    nixosConfigurations.theseus = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = {inherit inputs;};
      modules = [
        ./modules/theseus/configuration.nix
	determinate.nixosModules.default
	home-manager.nixosModules.home-manager
	{
	  home-manager.useGlobalPkgs = true;
	  home-manager.useUserPackages = true;
	  home-manager.users.ghil = ./home/theseus.nix;
	  home-manager.extraSpecialArgs = {
	    inherit inputs;
	    system = "x86_64-linux";
	  };
	}
      ];
    };
packages."x86_64-linux".default =
  (nvf.lib.neovimConfiguration {
    pkgs = import nixpkgs { system = "x86_64-linux"; };
    modules = [./modules/nvf/nvf-config.nix];
  }).neovim;
  };
}

and my nvf config:

{
  imports = [
    ./options.nix
    ./visual.nix
  ];

  vim = {
    viAlias = true;
    vimAlias = true;
  };
}

I don’t know what do to, it’s just not picking up the config at all, not throwing any errors, just not evaluating it at all (I tried putting in an invalid path to config, see if it would throw something, it didn’t)

Can someone help me? Thanks a lot in advance!

In which file are you adding Neovim to your installed packages?

You should have something like inputs.self.packages.${system}.default somewhere.

oh! I don’t know that! It’s passed as an environment package in my configuration.nix!

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  # Enable "experimental" features like flakes
  nix.settings.experimental-features = [ "nix-command" "flakes" ];

  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  # Use latest kernel.
  boot.kernelPackages = pkgs.linuxPackages_latest;

  networking.hostName = "theseus"; # Define your hostname.

  # Enable networking
  networking.networkmanager.enable = true;

  # Enable bluetooth
  hardware.bluetooth.enable = true; 
  hardware.bluetooth.powerOnBoot = true;

  # Set your time zone.
  time.timeZone = "America/New_York";

  # Select internationalisation properties.
  i18n.defaultLocale = "en_US.UTF-8";

  i18n.extraLocaleSettings = {
    LC_ADDRESS = "en_US.UTF-8";
    LC_IDENTIFICATION = "en_US.UTF-8";
    LC_MEASUREMENT = "en_US.UTF-8";
    LC_MONETARY = "en_US.UTF-8";
    LC_NAME = "en_US.UTF-8";
    LC_NUMERIC = "en_US.UTF-8";
    LC_PAPER = "en_US.UTF-8";
    LC_TELEPHONE = "en_US.UTF-8";
    LC_TIME = "en_US.UTF-8";
  };

  # Enable the X11 windowing system.
  # You can disable this if you're only using the Wayland session.
  services.xserver.enable = true;

  # Enable the KDE Plasma Desktop Environment.
  services.displayManager.sddm.enable = true;
  services.desktopManager.plasma6.enable = true;

  # Configure keymap in X11
  services.xserver.xkb = {
    layout = "us";
    variant = "";
  };

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Zsh is a nice nice shell
  programs.zsh.enable = true;

  # Enable sound with pipewire.
  services.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    # If you want to use JACK applications, uncomment this
    #jack.enable = true;

    # use the example session manager (no others are packaged yet so this is enabled by default,
    # no need to redefine it in your config for now)
    #media-session.enable = true;
  };

  # Enable touchpad support (enabled default in most desktopManager).
  # services.xserver.libinput.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.ghil = {
    isNormalUser = true;
    description = "Guillaume Labrie";
    extraGroups = [ "networkmanager" "wheel" ];
    shell = pkgs.zsh;
    packages = with pkgs; [
      kdePackages.kate
    #  thunderbird
    ];
  };

  # Enable automatic login for the user.
  services.displayManager.autoLogin.enable = true;
  services.displayManager.autoLogin.user = "ghil";

  # nh, because I like my fingies
  programs.nh = {
    enable = true;
    clean.enable = true;
    clean.extraArgs = "--keep-since 4d --keep 3";
    flake = "/home/ghil/.dotfiles";
  };

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
  fzf
  gcc
  git
  neovim
  zsh
  ];

  # Please for the love of all that is holy, don't touch
  system.stateVersion = "25.05";

}

You are including the default neovim package, with no customizations, in environment.systemPackages.

What nvf seems to do is have you call neovimConfiguration { ... } which produces a separate package - this is “your” copy of neovim, with customizations applied. As Federico noted, this is the one you want to include in the NixOS configuration.

See also NVF’s example nvf manual

I’m sorry to say, but I’m feeling very lost.
Here I tried to check the NVF manual, and tried to put in my environment packages the line, to no avail. I must’ve tried to complexify too soon, as I am rather lost on how I should be putting the line Federico mentioned, or the line from the nvf manual.
I am trying to learn and I’m sorry

What gets me is that I thought this:

packages."x86_64-linux".default =
  (nvf.lib.neovimConfiguration {
    pkgs = import nixpkgs { system = "x86_64-linux"; };
    modules = [./modules/nvf/nvf-config.nix];
  }).neovim;

Was what you are talking about. But that’s been there in the config since the start.

@NotAShelf fyi​​​​​​​​

Please include the actual code that you tried, and errors (if any) that you had.

This seems to come from misconceptions about flakes. What this code snippet does is define a package called default in your flake. That means you can do stuff like nix build or nix run it from the command line, or import it from another flake. It does not mean that it is automatically included in your NixOS machines defined in the same flake - there’s no magic here that would say “if I have defined a package in my flake, I want it to automatically get installed on all the machines that are defined in the same flake”.

Again, you already pass through inputs through specialArgs to your NixOS config, so including this package that you have defined in your NixOS configurations should be as simple as:

{ inputs, pkgs, ... }:
{
  environment.systemPackages = [ inputs.self.packages.${pkgs.system}.default ];
}

in your NixOS configuration.