if i try to add the nixvim
flake to my inputs, it says:
error: input 'githib:nix-community/nixvim/nixos-24.11' is unsupported
i am using nixos 24.11, and i do exactly what the installation guide says. what am i doing wrong?
i also tested it in another flake with the unstable version, that works, but i dont want to change my channel to unstable.
Because it’s a typo
1 Like
now it says:
error: syntax error, unexpected end of file at /nix/store/zzmdqn4v0jn0dxjwa6c0nj3nrqdgk6g5-source/nixvim/default.nix:1:1:
Works on my machine, could be some corruption on your end, from either interrupting a nix command or a forced shutdown for example. Try deleting ~/.cache/nix
and doing a store repair.
both does not fix it. what now?
No idea, like I said it seems to work fine on my end. Could be a nix bug, as I use lix instead.
ok, somehow got it. now, when i enable nixvim, i get the following error:
error:
… while calling the 'head' builtin
at /nix/store/4hpdrd3qvj7nks3rrimqm2jdmcga8isc-source/lib/attrsets.nix:1574:11:
1573| || pred here (elemAt values 1) (head values) then
1574| head values
| ^
1575| else
… while evaluating the attribute 'value'
at /nix/store/4hpdrd3qvj7nks3rrimqm2jdmcga8isc-source/lib/modules.nix:816:9:
815| in warnDeprecation opt //
816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
817| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/4hpdrd3qvj7nks3rrimqm2jdmcga8isc-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `warnings':
… while evaluating definitions from `/nix/store/4hpdrd3qvj7nks3rrimqm2jdmcga8isc-source/nixos/modules/system/boot/systemd.nix':
… while evaluating the option `systemd.services.home-manager-noof.serviceConfig':
… while evaluating definitions from `/nix/store/4hpdrd3qvj7nks3rrimqm2jdmcga8isc-source/flake.nix':
… while evaluating the option `home-manager.users.noof.home.file.".manpath".source':
… while evaluating definitions from `/nix/store/mdzxa36ixdm9g8yli9h73izv3kpj7xjq-source/modules/files.nix':
… while evaluating the option `home-manager.users.noof.home.file.".manpath".text':
… while evaluating definitions from `/nix/store/mdzxa36ixdm9g8yli9h73izv3kpj7xjq-source/modules/programs/man.nix':
… while evaluating the default value of option `plugins.lsp.servers.ts_query_ls.cmd`
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: ts_query_ls cannot be found in pkgs
what now?
Please share your code.
flake.nix:
{
description = "Noof Nixos Config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
niri.url = "github:sodiboo/niri-flake";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
#anyrun = {
# url = "github:anyrun-org/anyrun";
# inputs.nixpkgs.follows = "nixpkgs";
#};
};
outputs = { self, nixpkgs, home-manager, niri, nixvim }: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.noof = {pkgs, ...}: {
imports = [
./home.nix
niri.homeModules.niri
./alacritty
./niri
./fish
./waybar
./nixvim
nixvim.homeManagerModules.nixvim
#{environment.systemPackages = [anyrun.packages.x86_64-linux.anyrun];}
];
};
}
];
};
};
}
nixvim/default.nix:
{config, pkgs, ...}: {
programs.nixvim = {
enable = true;
# opts = {
# number = true;
# relativenumber = true;
# shiftwidth = 2;
# };
# plugins = {
# lightline.enable = true;
# };
};
}
Your nixvim branch needs to match your nixpkgs branch. Switch the nixvim input back to nixos-24.11
as you had mentioned in your initial post.