summaryrefslogtreecommitdiffstats
path: root/archetypes/collections/music.nix
blob: 6302d6844606d0b4974633af3193ea910b93af5e (plain)
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
{ pkgs, lib, config, ... }: let
	cfg = config._archetypes.collections.music;
	beetsWithPlugins = pkgs.python3Packages.beets.override {
		pluginOverrides = {
			alternatives = {
				enable = true;
				propagatedBuildInputs = [ pkgs.python3Packages.beets-alternatives ];
			};
		};
	};
in {
	options._archetypes.collections.music = {
		beets.enable = lib.mkEnableOption "enables beets";
		cd-tools.enable = lib.mkEnableOption "enables tools for burning, ripping, and converting cds";
	};

	config = {
		environment.systemPackages = with pkgs; lib.optionals cfg.beets.enable [
			beetsWithPlugins
		] ++ lib.optionals cfg.cd-tools.enable [
			abcde
			cdparanoia
			cdrdao
			cuetools
			flac
			shntool
			whipper
		];
	};
}