nixos-config/users/simon/modules/ytcc.nix

33 lines
760 B
Nix
Raw Permalink Normal View History

# SPDX-FileCopyrightText: 2021-2023 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
2021-03-09 15:29:13 +01:00
{ lib, pkgs, ... }:
2021-10-10 14:43:59 +02:00
let
2023-06-26 19:08:35 +02:00
ytdl-format = map (vc: "bestvideo[vcodec^=${vc}][width<=1920]+bestaudio[acodec^=opus]") [ "av01" "vp09" "avc1" ]
2021-10-10 14:43:59 +02:00
++ [
"bestvideo+bestaudio[acodec^=opus]"
"bestvideo+bestaudio"
"best"
];
in
2021-03-09 15:29:13 +01:00
{
xdg.configFile."ytcc/ytcc.conf".text = lib.generators.toINI { } {
ytcc = {
mpv_flags = lib.concatStringsSep " " [
"--really-quiet"
"--volume=90"
"--profile=clear-speed"
"--ytdl"
2021-10-10 14:43:59 +02:00
"--ytdl-format=${lib.concatStringsSep "/" ytdl-format}"
2021-03-09 15:29:13 +01:00
];
};
theme = {
table_alternate_background = 0;
};
};
home.packages = with pkgs; [ ytcc ];
2021-03-09 15:29:13 +01:00
}