mirror of
https://github.com/Username404-59/Dotfiles-NixOS.git
synced 2026-07-03 12:58:07 +02:00
Download my video wallpaper by making it (technically) a package
This commit is contained in:
parent
b09795ebd6
commit
6142dcd24f
@ -57,7 +57,6 @@ in
|
|||||||
})
|
})
|
||||||
(functions.mkUnstable ani-cli)
|
(functions.mkUnstable ani-cli)
|
||||||
anime4k
|
anime4k
|
||||||
yt-dlp
|
|
||||||
jetbrains.idea
|
jetbrains.idea
|
||||||
jetbrains.clion
|
jetbrains.clion
|
||||||
#androidStudioPackages.canary.full
|
#androidStudioPackages.canary.full
|
||||||
@ -149,6 +148,15 @@ in
|
|||||||
text_outline = true;
|
text_outline = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
yt-dlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
embed-thumbnail = true;
|
||||||
|
add-metadata = true;
|
||||||
|
format = "bestvideo+251/best";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.stateVersion = "26.11";
|
home.stateVersion = "26.11";
|
||||||
|
|||||||
@ -15,9 +15,31 @@ let
|
|||||||
|
|
||||||
find_monitor = id: "$(hyprctl monitors -j | jq -r '.[] | select(.id==${builtins.toString id}) | .name')";
|
find_monitor = id: "$(hyprctl monitors -j | jq -r '.[] | select(.id==${builtins.toString id}) | .name')";
|
||||||
|
|
||||||
|
mkVideoWallpaper = id: hash:
|
||||||
|
"${(pkgs.stdenv.mkDerivation {
|
||||||
|
name = "doggo-video-wallpaper-${id}";
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.yt-dlp ];
|
||||||
|
|
||||||
|
outputHashMode = "recursive";
|
||||||
|
outputHashAlgo = "blake3";
|
||||||
|
outputHash = hash; # lib.fakeHash doesn't work for blake3 so I'll have to pass empty strings to find the hashes easily
|
||||||
|
|
||||||
|
buildCommand = ''
|
||||||
|
cd $out
|
||||||
|
|
||||||
|
yt-dlp \
|
||||||
|
-f "bestvideo[ext=mp4]+251/best[ext=mp4]" \
|
||||||
|
--no-playlist \
|
||||||
|
--audio-quality 0 \
|
||||||
|
-o "wallpaper.mp4" \
|
||||||
|
"https://www.youtube.com/watch?v=${id}"
|
||||||
|
'';
|
||||||
|
})}/wallpaper.mp4";
|
||||||
|
|
||||||
backgrounds_commands = [
|
backgrounds_commands = [
|
||||||
"swaybg -i '${./backgrounds/ubuntu_budgie_wallpaper1.jpg}' -o ${find_monitor 0}"
|
"swaybg -i '${./backgrounds/ubuntu_budgie_wallpaper1.jpg}' -o ${find_monitor 0}"
|
||||||
"murale '/disk2/MemoryRebootHatsune&Shrek.avi' -o ${find_monitor 1} --mpv-options '${mpv_options}'" # TODO: Make nixtamal download it with yt-dlp
|
"murale ${mkVideoWallpaper "ketQTGwA4Lo" "blake3-yvuyjhbBTCqhsxmrjXE3cccC/F+8MisTCpnH+2v8h9w="} -o ${find_monitor 1} --mpv-options '${mpv_options}'"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Start(/stop) my backgrounds on (un)plug
|
# Start(/stop) my backgrounds on (un)plug
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user