Files
chiasson-nix/modules/system/yt-dlp-telequebec-overlay.nix
Olivier 2bdb173ac7 Refactor NixOS configurations to replace "NixOS-V2" with "chiasson-nix" across multiple modules
- Updated wallpaper module to reflect new naming convention for wallpapers.
- Changed author name in rbw-lock-toggle and wvkbd-toggle plugins to "chiasson.cloud".
- Modified ideapad configuration to use the new flake path.
- Adjusted yt-dlp-telequebec-overlay documentation to match new module structure.
- Corrected documentation reference in wisdom module to point to updated conventions.
2026-06-06 03:26:58 -03:00

36 lines
1.2 KiB
Nix

# Tele-Québec extractor fixes until upstream yt-dlp carries them.
#
# Regenerate `modules/patches/yt-dlp-telequebec.patch` from yt-dlp checkout
# (branch with fixes vs master), redirecting into this flake's modules/patches/:
#
# git diff master..ie/telequebec-update -- \
# yt_dlp/extractor/telequebec.py yt_dlp/extractor/_extractors.py \
# > path/to/chiasson-nix/modules/patches/yt-dlp-telequebec.patch
#
{ ... }: {
flake.nixosModules.systemYtDlpTelequebecPatch =
{ config, lib, ... }:
let
cfg = config.chiasson.system.ytDlpTelequebecPatch;
patchFile = ../patches/yt-dlp-telequebec.patch;
in
{
options.chiasson.system.ytDlpTelequebecPatch = {
enable = lib.mkEnableOption ''
Patch yt-dlp with Tele-Québec extractor updates (telequebec.tv, Coucou, season playlists).
Regenerate `modules/patches/yt-dlp-telequebec.patch` when nixpkgs bumps yt-dlp if the build fails.
'';
};
config = lib.mkIf cfg.enable {
nixpkgs.overlays = lib.mkOrder 1000 [
(final: prev: {
yt-dlp = prev.yt-dlp.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ patchFile ];
});
})
];
};
};
}