Compare commits
2 Commits
78614bccb9
...
820d644846
Author | SHA1 | Date | |
---|---|---|---|
820d644846 | |||
d85c6ef4a2 |
@ -42,11 +42,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1692808169,
|
||||
"narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=",
|
||||
"lastModified": 1693028636,
|
||||
"narHash": "sha256-WOG42JO/yyvgYK3jQktDEy2qtZI7R+s3Lo4Y9gBr6XM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9201b5ff357e781bf014d0330d18555695df7ba8",
|
||||
"rev": "e61ea96d43505ba0d2c066134eb9d67cadfddce7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
let
|
||||
packages = ps: with ps; [
|
||||
numpy
|
||||
matplotlib
|
||||
tkinter
|
||||
pillow
|
||||
psycopg
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
{
|
||||
programs.yt-dlp.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
flac
|
||||
];
|
||||
|
||||
home.file.".local/bin/ytdlp-music" = {
|
||||
source = ./yt-dlp/ytdlp-music.sh;
|
||||
|
@ -1,6 +1,24 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "Name:" && read name
|
||||
echo "URL:" && read url
|
||||
printf "YT 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
|
||||
|
0
maddie/nixos/dmenu/dmenu-code
Executable file → Normal file
0
maddie/nixos/dmenu/dmenu-code
Executable file → Normal file
0
maddie/nixos/dmenu/dmenu-man
Executable file → Normal file
0
maddie/nixos/dmenu/dmenu-man
Executable file → Normal file
@ -7,11 +7,20 @@
|
||||
];
|
||||
|
||||
# Setup bootloader
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "max";
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
# Plymouth
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
#logo = ./plymouth/logo.png;
|
||||
};
|
||||
|
||||
# Setup crypto keyfile
|
||||
boot.initrd.secrets = {
|
||||
"/crypto_keyfile.bin" = null;
|
||||
|
@ -4,6 +4,7 @@
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
font-awesome
|
||||
source-sans
|
||||
source-han-sans
|
||||
source-han-serif
|
||||
source-han-code-jp
|
||||
|
BIN
systems/mdesktop/plymouth/logo.png
Normal file
BIN
systems/mdesktop/plymouth/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
@ -57,6 +57,7 @@
|
||||
|
||||
# Learning
|
||||
"anki"
|
||||
"obsidian"
|
||||
|
||||
# Tools
|
||||
"boop"
|
||||
|
Loading…
Reference in New Issue
Block a user