blob: 9e965e522a9f2c7036444c5312f8303c180a8cf8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{ config, lib, pkgs, hostname, ... }:
let
musicDirectory = if (hostname == "tahoe") then
"/data/fast/music"
else
"/home/fcuny/media/music";
in {
xdg.configFile."yt-dlp/config".source = ../configs/yt-dlp/config;
home.packages = with pkgs; [
yt-dlp
flac
abcde
(pkgs.writers.writeDashBin "rip-flac" ''
${pkgs.abcde}/bin/abcde -Vx -G -a "cddb,read,encode,tag,move,clean" -o flac
'')
];
# inspired from https://blog.yossarian.net/2022/02/21/Enjoying-music-curation-again
programs.beets = {
enable = true;
settings = {
directory = musicDirectory;
plugins =
"fromfilename discogs duplicates fetchart embedart badfiles lastgenre scrub";
paths = {
default = "$albumartist/$album%aunique{}/$track $title";
singleton = "Singles/$artist/$title";
comp = "Compilations/$album%aunique{}/$track - $title";
"albumtype:soundtrack" = "Soundtracks/$album ($year)/$track $title";
};
import = {
copy = true;
move = true;
};
va_name = "Various Artists";
embedart = { ifempty = true; };
lastgenre = {
auto = false;
canonical = true;
fallback = "unknown";
force = true;
prefer_specific = true;
};
fetchart = {
cautious = true;
sources = "filesystem coverart itunes amazon lastfm wikipedia";
};
};
};
}
|