2019-10-24 02:20:38 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.custom.video;
|
|
|
|
|
2020-03-28 10:04:00 +01:00
|
|
|
# show keyboard input on desktop for screencasts
|
|
|
|
screenKey = pkgs.symlinkJoin {
|
|
|
|
name = "screen-keys";
|
|
|
|
paths = let
|
|
|
|
screenKeyScript = { position ? "bottom", size ? "small", ... }:
|
|
|
|
pkgs.writeShellScriptBin "screenkeys-${position}-${size}" # sh
|
|
|
|
''
|
|
|
|
${pkgs.screenkey}/bin/screenkey \
|
|
|
|
--no-detach \
|
|
|
|
--bg-color '#fdf6e3' \
|
|
|
|
--font-color '#073642' \
|
|
|
|
-p ${position} \
|
|
|
|
-s ${size} \
|
|
|
|
"$@"
|
|
|
|
'';
|
|
|
|
in lib.flatten (lib.flip map [ "large" "small" "medium" ] (size:
|
|
|
|
lib.flip map [ "top" "center" "bottom" ]
|
|
|
|
(position: screenKeyScript { inherit size position; })));
|
|
|
|
};
|
|
|
|
|
2019-10-24 02:20:38 +02:00
|
|
|
in {
|
|
|
|
|
|
|
|
options.programs.custom.video.enable = mkEnableOption "enable video tools";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
youtube-dl
|
|
|
|
mplayer
|
|
|
|
mpv
|
|
|
|
|
|
|
|
# to record your screen
|
|
|
|
# ---------------------
|
|
|
|
simplescreenrecorder
|
2020-03-28 10:04:00 +01:00
|
|
|
screenKey
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
# to transcode video material
|
|
|
|
# ---------------------------
|
|
|
|
handbrake
|
|
|
|
ffmpeg-full
|
|
|
|
|
|
|
|
# video editing
|
|
|
|
# -------------
|
|
|
|
openshot-qt
|
|
|
|
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|