some nice updates

This commit is contained in:
Maddie H 2023-09-30 22:27:40 +01:00
parent d85c6ef4a2
commit 820d644846
Signed by: maddie
GPG Key ID: C296DE8C9053683F
5 changed files with 35 additions and 4 deletions

View File

@ -2,6 +2,9 @@
{ {
programs.yt-dlp.enable = true; programs.yt-dlp.enable = true;
home.packages = with pkgs; [
flac
];
home.file.".local/bin/ytdlp-music" = { home.file.".local/bin/ytdlp-music" = {
source = ./yt-dlp/ytdlp-music.sh; source = ./yt-dlp/ytdlp-music.sh;

View File

@ -1,6 +1,24 @@
#!/usr/bin/env sh #!/usr/bin/env sh
echo "Name:" && read name printf "YT URL: " && read url
echo "URL:" && read url printf "Title: " && read title
printf "Artist: " && read artist
yt-dlp -x --no-playlist --embed-thumbnail --no-embed-metadata --audio-quality 0 --audio-format flac -o "$name" "$url" # Download file from youtube
yt-dlp -x --no-playlist --embed-thumbnail --no-embed-metadata --audio-quality 0 --audio-format flac -o "$title.flac" "$url"
# Set metadata flags
metaflac --set-tag="TITLE=$title" --set-tag="ARTIST=$artist" "$title.flac"
# Export thumbnail
metaflac --export-picture-to="$title.png" "$title.flac"
# Convert png to jpg
mogrify -format jpg "$title.png"
rm -rf "$title.png"
# Convert to square
convert "$title.jpg" -gravity center -crop 1:1 "$title.jpg"
# Move the files to the correct directory
mv "$title.flac" "$title.jpg" $HOME/Music/iPod

View File

@ -7,11 +7,20 @@
]; ];
# Setup bootloader # Setup bootloader
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot = {
enable = true;
consoleMode = "max";
};
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.initrd.systemd.enable = true; boot.initrd.systemd.enable = true;
# Plymouth
boot.plymouth = {
enable = true;
#logo = ./plymouth/logo.png;
};
# Setup crypto keyfile # Setup crypto keyfile
boot.initrd.secrets = { boot.initrd.secrets = {
"/crypto_keyfile.bin" = null; "/crypto_keyfile.bin" = null;

View File

@ -4,6 +4,7 @@
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
nerdfonts nerdfonts
font-awesome font-awesome
source-sans
source-han-sans source-han-sans
source-han-serif source-han-serif
source-han-code-jp source-han-code-jp

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB