diff --git a/config/home.nix b/config/home.nix index 680397e..95b1e3f 100644 --- a/config/home.nix +++ b/config/home.nix @@ -53,11 +53,14 @@ in { csharp-ls cups curl + dbeaver-bin discord + dolphin-emu dotnet-sdk_8 dotnetPackages.Nuget dunst easytag + ffmpeg firefox flac flameshot diff --git a/config/packages/default.nix b/config/packages/default.nix index bc6215b..0e0f4a5 100644 --- a/config/packages/default.nix +++ b/config/packages/default.nix @@ -8,5 +8,6 @@ ./neovim ./picom ./polybar + ./yt-dlp ]; } diff --git a/config/packages/yt-dlp/config b/config/packages/yt-dlp/config new file mode 100644 index 0000000..77467f2 --- /dev/null +++ b/config/packages/yt-dlp/config @@ -0,0 +1,22 @@ +# Output format: album/tracks.format +-o "%(album,playlist_title)U/%(track_number,playlist_index)s - %(title)U.%(ext)s" +--windows-filenames +# --restrict-filenames + +# Extract audio +-f bestaudio +--extract-audio +--audio-format mp3 + +# Thumbnail squared +--convert-thumbnails png +--ppa "ThumbnailsConvertor+ffmpeg_o:-c:v png -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\"" +--embed-thumbnail + +# Metadata, with playlist number as track number if the latter is missing +--embed-metadata +--parse-metadata "playlist_index:%(track_number)s" + +# Misc +--no-overwrites +--concurrent-fragments 4 diff --git a/config/packages/yt-dlp/default.nix b/config/packages/yt-dlp/default.nix new file mode 100644 index 0000000..e89916e --- /dev/null +++ b/config/packages/yt-dlp/default.nix @@ -0,0 +1,3 @@ +{ + home.file."/home/vylpes/.config/yt-dlp/config".source = ./config; +} diff --git a/flake.lock b/flake.lock index 54ad83d..7490bf9 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1726818100, - "narHash": "sha256-z2V74f5vXqkN5Q+goFlhbFXY/dNaBAyeLpr2bxu4Eic=", + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "owner": "nix-community", "repo": "home-manager", - "rev": "1bbc1a5a1f4de7401c92db85b2119ed21bb4139d", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1729691686, + "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", "type": "github" }, "original": { diff --git a/system/shared.nix b/system/shared.nix index 6bd3de5..5105a21 100644 --- a/system/shared.nix +++ b/system/shared.nix @@ -114,10 +114,6 @@ gcm = "git commit -m"; gco = "git checkout"; - yt-mp3 = "yt-dlp -xi --audio-format mp3"; - yt-mp3-meta = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata"; - yt-mp3-meta-cookies = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata --cookies-from-browser firefox"; - s = "swallow"; }; };