Closed jasper-clarke closed 3 months ago
I'm trying to rebuild my system but it keeps trying to symlink a
init.lua
to my neovim config directory. And so it fails because I already have a config there.
What Stylix version are you encountering this on?
For reference, maybe something is wrong with the NixVim guard:
Considering your stylix.targets.nixvim.enable = lib.mkForce false;
declaration, the problem might come from somewhere else.
@trueNAHO
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-foot": "base16-foot",
"base16-helix": "base16-helix",
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1719525570,
"narHash": "sha256-xSO/H67GAHEW0siD2PHoO/e97MbROL3r3s5SpF6A6Dc=",
"owner": "danth",
"repo": "stylix",
"rev": "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
I am unable to reproduce this issue in my standalone Home Manager setup when updating Stylix to 1ff9d37d27377bfe8994c24a8d6c6c1734ffa116
and disabling stylix.targets.nixvim.enable
and my internal NixVim module.
However, additionally adding
programs.neovim = { enable = true; defaultEditor = true; };
and running
rm ~/.config/nvim/init.lua
touch ~/.config/nvim/init.lua
home-manager switch --flake <FLAKE>
causes the following expected error:
Existing file '<HOME>/.config/nvim/init.lua' is in the way of '/nix/store/<HASH>-home-manager-files/.config/nvim/init.lua'
Please do one of the following:
- Move or remove the above files and try again.
- In standalone mode, use 'home-manager switch -b backup' to back up
files automatically.
- When used as a NixOS or nix-darwin module, set
'home-manager.backupFileExtension'
to, for example, 'backup' and rebuild.
Consider inspecting https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/programs/neovim.nix and removing your programs.neovim.enable = true;
declaration. If your Neovim configuration is not installed by your NixOS configuration then you might want to add neovim
to your systemPackages
instead.
Alternatively, the VIM module might be the culprit:
Does extending
nixvim.enable = lib.mkForce false;
with
nixvim.enable = lib.mkForce false;
vim.enable = lib.mkForce false;
resolve the issue?
@trueNAHO Yes that fixes the issue, thank you very much.
I'm trying to rebuild my system but it keeps trying to symlink a
init.lua
to my neovim config directory. And so it fails because I already have a config there.My config: