about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-03 14:28:40 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-03 14:28:40 -0700
commit4b2d03fdfcce5bc6655eb14cec3ca8866d70a81c (patch)
treeaee11acbdfd2909bd3f2a1b426f049ba68f4ef0e /users
parentrename `desktop` to `isDesktop` (diff)
downloadworld-4b2d03fdfcce5bc6655eb14cec3ca8866d70a81c.tar.gz
set the music directory based on host's name
Diffstat (limited to 'users')
-rw-r--r--users/fcuny/cli/media.nix12
1 files 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 = {