feat: add home-manager module output
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m19s

This commit is contained in:
Konstantin Fickel 2026-02-14 17:59:43 +01:00
parent c0911307fd
commit 646241f355
Signed by: kfickel
GPG key ID: A793722F9933C1A5
2 changed files with 50 additions and 6 deletions

View file

@ -85,6 +85,50 @@
in
{
homeManagerModules.default =
{
lib,
config,
pkgs,
...
}:
let
cfg = config.programs.streamer;
in
{
options.programs.streamer = {
enable = lib.mkEnableOption "streamer";
base-folder = lib.mkOption {
type = lib.types.str;
description = "Base Folder of Streamer";
};
package = lib.mkOption {
type = lib.types.package;
default = self.packages.${pkgs.system}.streamer;
defaultText = lib.literalExpression "inputs.streamer.packages.\${pkgs.system}.streamer";
description = "The package to use for the streamer binary.";
};
};
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "programs.streamer" pkgs lib.platforms.linux)
];
home.packages = [ cfg.package ];
xdg.configFile."streamer/config.yaml".source =
(pkgs.formats.yaml { }).generate "streamer-configuration"
{
base_folder = cfg.base-folder;
};
home.shellAliases.s = "streamer";
};
};
# Package a virtual environment as our main application.
#
# Enable no optional dependencies for production build.