mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
users/foo-dogsquared: update yt-dlp-audio configuration
This commit is contained in:
parent
6ce4b3a486
commit
9abe64cb44
14
users/home-manager/foo-dogsquared/config/yt-dlp-audio.conf
Normal file
14
users/home-manager/foo-dogsquared/config/yt-dlp-audio.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Don't overwrite for cautious individuals.
|
||||||
|
--no-overwrite
|
||||||
|
|
||||||
|
# To make sure all audio-related.
|
||||||
|
--extract-audio
|
||||||
|
--format bestaudio
|
||||||
|
--audio-format opus
|
||||||
|
|
||||||
|
--output '%(track_number,playlist_autonumber)d-%(track,title)s.%(ext)s'
|
||||||
|
--download-archive archive
|
||||||
|
|
||||||
|
# Add all sorts of metadata.
|
||||||
|
--embed-thumbnail
|
||||||
|
--add-metadata
|
@ -1,24 +1,8 @@
|
|||||||
{ config, options, lib, pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
yt-dlp-for-audio-config = pkgs.writeText "yt-dlp-for-audio-config" ''
|
ytdlpAudio = pkgs.writeScriptBin "yt-dlp-audio" ''
|
||||||
# Don't overwrite for cautious individuals.
|
${pkgs.yt-dlp}/bin/yt-dlp --config-location "${./config/yt-dlp-audio.conf}" $@
|
||||||
--no-overwrite
|
|
||||||
|
|
||||||
# To make sure all audio-related.
|
|
||||||
--extract-audio
|
|
||||||
--format bestaudio
|
|
||||||
--audio-format opus
|
|
||||||
|
|
||||||
--output '%(track_number,playlist_autonumber)d-%(track,title)s.%(ext)s'
|
|
||||||
--download-archive archive
|
|
||||||
|
|
||||||
# Add all sorts of metadata.
|
|
||||||
--embed-thumbnail
|
|
||||||
--add-metadata
|
|
||||||
'';
|
|
||||||
yt-dlp-for-audio = pkgs.writeScriptBin "yt-dlp-audio" ''
|
|
||||||
${pkgs.yt-dlp}/bin/yt-dlp --config-location "${yt-dlp-for-audio-config}" $@
|
|
||||||
'';
|
'';
|
||||||
getDotfiles = path: config.lib.file.mkOutOfStoreSymlink "${config.home.mutableFile."library/dotfiles".path}/${path}";
|
getDotfiles = path: config.lib.file.mkOutOfStoreSymlink "${config.home.mutableFile."library/dotfiles".path}/${path}";
|
||||||
|
|
||||||
@ -36,7 +20,7 @@ in
|
|||||||
songrec
|
songrec
|
||||||
vscodium-fhs
|
vscodium-fhs
|
||||||
neovim
|
neovim
|
||||||
yt-dlp-for-audio
|
ytdlpAudio # My custom script for downloading music with yt-dlp.
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user