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:
parent
967628d34b
commit
900094e45a
32
flake.nix
32
flake.nix
|
|
@ -7,6 +7,32 @@
|
|||
};
|
||||
|
||||
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:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
|
@ -45,5 +71,9 @@
|
|||
neovim = neovim-kickstart;
|
||||
};
|
||||
}
|
||||
);
|
||||
) // {
|
||||
# Home Manager module (not system-specific)
|
||||
homeManagerModules.default = homeManagerModule;
|
||||
homeManagerModules.neovim-kickstart = homeManagerModule;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue