feat: add home-manager module output
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m19s
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m19s
This commit is contained in:
parent
c0911307fd
commit
646241f355
2 changed files with 50 additions and 6 deletions
44
flake.nix
44
flake.nix
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue