users/foo-dogsquared/dotfiles: update conditionals and Neovim setup

This commit is contained in:
Gabriel Arazas 2025-01-29 11:20:27 +08:00
parent 383d4efcc5
commit e89ea98f8b
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 9 additions and 3 deletions

View File

@ -123,7 +123,7 @@ in
diff = pkgs.diffoscope;
pager = config.programs.bat.package;
editor =
if userCfg.programs.nixvim.enable then
if config.programs.nixvim.enable then
config.programs.nixvim.finalPackage
else
config.programs.neovim.package;

View File

@ -43,16 +43,22 @@ in
# Comes with a heavy assumption that the Neovim configuration found in this
# home-manager environment will not write to the XDG config directory.
(lib.mkIf (!config.programs.nixvim.enable) {
(lib.mkIf (config.programs.neovim.enable) {
xdg.configFile.nvim.source = getDotfiles "nvim";
programs.neovim.extraPackages = with pkgs; [
luarocks
shfmt
cmake
# Just assume that there is no clipboard thingy that is already managed
# within this home-manager configuration.
wl-clipboard
xclip
];
})
(lib.mkIf userCfg.programs.nushell.enable {
(lib.mkIf config.programs.nushell.enable {
home.file."${config.xdg.dataHome}/nushell/vendor/autoload".source = getDotfiles "nu/autoload";
})
]);