feat: add home-manager module for programs.bulkgen.enable

Expose homeManagerModules.bulkgen and homeManagerModules.default
from the flake. The module provides programs.bulkgen.enable and
programs.bulkgen.package options, adding bulkgen to home.packages
when enabled.
This commit is contained in:
Konstantin Fickel 2026-02-14 10:33:33 +01:00
parent 6926d0492d
commit a32e0f1b3e
Signed by: kfickel
GPG key ID: A793722F9933C1A5
2 changed files with 29 additions and 2 deletions

View file

@ -25,6 +25,7 @@
outputs = outputs =
{ {
self,
nixpkgs, nixpkgs,
pyproject-nix, pyproject-nix,
uv2nix, uv2nix,
@ -105,14 +106,20 @@
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs.callPackages pyproject-nix.build.util { }) mkApplication; inherit (pkgs.callPackages pyproject-nix.build.util { }) mkApplication;
in in
{ rec {
default = mkApplication { bulkgen = mkApplication {
venv = pythonSet.mkVirtualEnv "bulkgen-env" workspace.deps.default; venv = pythonSet.mkVirtualEnv "bulkgen-env" workspace.deps.default;
package = pythonSet.bulkgen; package = pythonSet.bulkgen;
}; };
default = bulkgen;
} }
); );
homeManagerModules = rec {
bulkgen = import ./nix/hm-module.nix self;
default = bulkgen;
};
checks = forAllSystems ( checks = forAllSystems (
system: system:
let let

20
nix/hm-module.nix Normal file
View file

@ -0,0 +1,20 @@
self:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.programs.bulkgen;
in
{
options.programs.bulkgen = {
enable = lib.mkEnableOption "bulkgen";
package = lib.mkPackageOption self.packages.${pkgs.system} "bulkgen" { };
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
};
}