feat(nix): add home-manager module output

Add homeManagerModules output to enable easy integration with
home-manager. Users can now add this to their home-manager config:

  inputs.kickstart-nvim.url = "github:0xWheatyz/kickstart.nvim";

  programs.neovim-kickstart.enable = true;

The module installs the Neovim package and copies the configuration
files to ~/.config/nvim, along with recommended dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
0xWheatyz 2026-02-19 18:39:27 -05:00
parent 967628d34b
commit 900094e45a
1 changed files with 31 additions and 1 deletions

View File

@ -7,6 +7,32 @@
}; };
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
let
# Home Manager module
homeManagerModule = { config, lib, pkgs, ... }: {
options.programs.neovim-kickstart = {
enable = lib.mkEnableOption "kickstart.nvim configuration";
};
config = lib.mkIf config.programs.neovim-kickstart.enable {
home.packages = [ self.packages.${pkgs.system}.default ];
home.file.".config/nvim" = {
source = self;
recursive = true;
};
# Optional: Install recommended dependencies
home.packages = with pkgs; [
ripgrep
fd
gcc
gnumake
git
];
};
};
in
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
@ -45,5 +71,9 @@
neovim = neovim-kickstart; neovim = neovim-kickstart;
}; };
} }
); ) // {
# Home Manager module (not system-specific)
homeManagerModules.default = homeManagerModule;
homeManagerModules.neovim-kickstart = homeManagerModule;
};
} }