Compare commits

...

2 Commits

Author SHA1 Message Date
820d644846
some nice updates 2023-09-30 22:27:40 +01:00
d85c6ef4a2
some fixes and new packages 2023-09-27 08:46:49 +01:00
10 changed files with 41 additions and 7 deletions

View File

@ -42,11 +42,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1692808169, "lastModified": 1693028636,
"narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", "narHash": "sha256-WOG42JO/yyvgYK3jQktDEy2qtZI7R+s3Lo4Y9gBr6XM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9201b5ff357e781bf014d0330d18555695df7ba8", "rev": "e61ea96d43505ba0d2c066134eb9d67cadfddce7",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,6 +2,8 @@
let let
packages = ps: with ps; [ packages = ps: with ps; [
numpy
matplotlib
tkinter tkinter
pillow pillow
psycopg psycopg

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

0
maddie/nixos/dmenu/dmenu-code Executable file → Normal file
View File

0
maddie/nixos/dmenu/dmenu-man Executable file → Normal file
View File

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

View File

@ -57,6 +57,7 @@
# Learning # Learning
"anki" "anki"
"obsidian"
# Tools # Tools
"boop" "boop"