Skip to content

Commit

Permalink
nix(neovim): add flake app for quick testing of the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
midchildan committed Sep 8, 2024
1 parent df379f5 commit 0129912
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions nix/apps/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
flake-parts-lib,
lib,
config,
self,
...
}:

Expand Down Expand Up @@ -32,6 +33,28 @@ in
{
home.program = "${inputs'.home.packages.default}/bin/home-manager";
ansible.program = "${pkgs.callPackage ./ansible.nix { }}";
neovim.program =
let
homeConf = self.lib.mkHome {
inherit pkgs;
modules = [
{
dotfiles.profiles = {
minimal.enable = false;
neovim.enable = true;
};
home.stateVersion = "24.05";
}
];
};
nvim = "${homeConf.activationPackage}/home-path/bin/nvim";
configDir = "${homeConf.activationPackage}/home-files/.config";
in
pkgs.writers.writeBashBin "nvim" ''
unset NVIM_APPNAME MYVIMRC
export XDG_CONFIG_HOME=${configDir}
${nvim} "$@"
'';
}
// lib.optionalAttrs pkgs.stdenv.isLinux {
os.program = "${self'.packages.nixos-rebuild}/bin/nixos-rebuild";
Expand Down

0 comments on commit 0129912

Please sign in to comment.