From 5555575f63c6ffefac2654e8e5a7a66e2b2e6d08 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 1 Apr 2022 11:56:43 -0700 Subject: consolidate configuration for music curation --- users/fcuny/cli/beets.nix | 37 ---------------------------------- users/fcuny/cli/default.nix | 11 ++-------- users/fcuny/cli/media.nix | 49 +++++++++++++++++++++++++++++++++++++++++++++ users/fcuny/cli/yt-dlp.nix | 9 --------- 4 files changed, 51 insertions(+), 55 deletions(-) delete mode 100644 users/fcuny/cli/beets.nix create mode 100644 users/fcuny/cli/media.nix delete mode 100644 users/fcuny/cli/yt-dlp.nix (limited to 'users') diff --git a/users/fcuny/cli/beets.nix b/users/fcuny/cli/beets.nix deleted file mode 100644 index 39802a7..0000000 --- a/users/fcuny/cli/beets.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - programs.beets = { - enable = true; - settings = { - directory = "/data/fast/music"; - 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"; - }; - }; - }; -} diff --git a/users/fcuny/cli/default.nix b/users/fcuny/cli/default.nix index 2478998..77d236e 100644 --- a/users/fcuny/cli/default.nix +++ b/users/fcuny/cli/default.nix @@ -1,15 +1,8 @@ { config, lib, pkgs, ... }: { - imports = [ - ./backups.nix - ./beets.nix - ./git.nix - ./shell.nix - ./ssh.nix - ./tmux.nix - ./yt-dlp.nix - ]; + imports = + [ ./backups.nix ./git.nix ./media.nix ./shell.nix ./ssh.nix ./tmux.nix ]; home.packages = [ pkgs.gcc pkgs.gnumake pkgs.jq pkgs.ripgrep ]; } diff --git a/users/fcuny/cli/media.nix b/users/fcuny/cli/media.nix new file mode 100644 index 0000000..2dc54a5 --- /dev/null +++ b/users/fcuny/cli/media.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, ... }: + +{ + 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 = "/data/fast/music"; + 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"; + }; + }; + }; +} diff --git a/users/fcuny/cli/yt-dlp.nix b/users/fcuny/cli/yt-dlp.nix deleted file mode 100644 index d271692..0000000 --- a/users/fcuny/cli/yt-dlp.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - xdg.configFile."yt-dlp/config".source = ../configs/yt-dlp/config; - - home.packages = with pkgs; [ - yt-dlp - ]; -} -- cgit 1.4.1