From 4b2d03fdfcce5bc6655eb14cec3ca8866d70a81c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 3 Apr 2022 14:28:40 -0700 Subject: set the music directory based on host's name --- users/fcuny/cli/media.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/users/fcuny/cli/media.nix b/users/fcuny/cli/media.nix index 2dc54a5..9e965e5 100644 --- a/users/fcuny/cli/media.nix +++ b/users/fcuny/cli/media.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: - -{ +{ 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; [ @@ -16,7 +20,7 @@ programs.beets = { enable = true; settings = { - directory = "/data/fast/music"; + directory = musicDirectory; plugins = "fromfilename discogs duplicates fetchart embedart badfiles lastgenre scrub"; paths = { -- cgit 1.4.1