diff options
Diffstat (limited to '')
-rw-r--r-- | modules/home.legacy/conf/beets/default.nix | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/modules/home.legacy/conf/beets/default.nix b/modules/home.legacy/conf/beets/default.nix index e0421a9d..612a5f03 100644 --- a/modules/home.legacy/conf/beets/default.nix +++ b/modules/home.legacy/conf/beets/default.nix @@ -1,3 +1,12 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { pkgs, lib, @@ -32,9 +41,12 @@ in { color = true; }; - include = [ - "./replace_override.yaml" - ]; + replace = { + "[/]" = "\\"; + "[\\x00-\\x1f]" = ""; + "\\s+$" = ""; + "^\\s+" = ""; + }; import = { # move, instead of copying or linking the files @@ -53,15 +65,11 @@ in { }; paths = let - j = lib.strings.concatStringsSep "/"; + join = lib.strings.concatStringsSep "/"; in { - default = j ["[Default]" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"]; - "albumtype:live" = j ["[Live]" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"]; + "albumtype:live" = join ["[Live, please delete]" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"]; - "albumtype:album" = j ["Music" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"]; - "albumtype::(Single|EP)" = j ["Music" "$genre" "$first_artist_singleton" "$album ($albumtype)" "$track $title"]; - "albumtype:compilation" = j ["Complilations" "$genre" "Various Artists" "$album ($albumtype)" "$track $title"]; - "albumtype:soundtrack" = j ["Soundtracks" "$genre" "$first_artist" "$album" "$track $title"]; + default = "$albumartist/$album%aunique{}/$track $title"; }; inherit plugins; @@ -93,8 +101,6 @@ in { }; }; - xdg.configFile."beets/replace_override.yaml".source = ./replace_override.yaml; - # Use the json formatter instead of the YAML one, as the YAML formatter mangles the # longer python inline strings. # YAML is a superset of JSON. |