71 lines
1.3 KiB
Nix
71 lines
1.3 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
inputs,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
{
|
|
options = {
|
|
apps.video = {
|
|
base.enable = lib.mkEnableOption "enable basic video";
|
|
editing.enable = lib.mkEnableOption "enable video editing";
|
|
media.enable = lib.mkEnableOption "enable video media";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
environment.systemPackages =
|
|
with pkgs;
|
|
[ ]
|
|
++ (
|
|
if config.apps.video.base.enable then
|
|
|
|
[
|
|
mpv
|
|
yt-dlp
|
|
]
|
|
else
|
|
[ ]
|
|
)
|
|
++ (
|
|
if config.apps.video.editing.enable then
|
|
|
|
[
|
|
kdePackages.kdenlive
|
|
kdePackages.qtwebsockets
|
|
]
|
|
else
|
|
[ ]
|
|
)
|
|
++ (
|
|
if config.apps.video.media.enable then
|
|
|
|
[
|
|
jellyfin-desktop
|
|
pipeline
|
|
]
|
|
else
|
|
[ ]
|
|
);
|
|
programs = {
|
|
obs-studio =
|
|
if config.apps.video.editing.enable then
|
|
{
|
|
enable = true;
|
|
enableVirtualCamera = true;
|
|
plugins = with pkgs.obs-studio-plugins; [
|
|
wlrobs
|
|
obs-backgroundremoval
|
|
obs-pipewire-audio-capture
|
|
obs-vaapi # optional AMD hardware acceleration
|
|
obs-gstreamer
|
|
obs-vkcapture
|
|
];
|
|
}
|
|
else
|
|
{ };
|
|
};
|
|
};
|
|
}
|