about summary refs log tree commit diff
path: root/home/flac/default.nix
blob: 42500afd2bb669d27d0fe23d946e1e614265704e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ config, lib, pkgs, ... }:
let cfg = config.my.home.flac;
in
{
  options.my.home.flac = with lib; {
    enable = mkEnableOption "flac configuration";
  };

  config.home.packages = with pkgs;
    lib.mkIf cfg.enable ([
      flac
      abcde
      (pkgs.writers.writeDashBin "rip-flac" ''
        cd ~/import
        ${pkgs.abcde}/bin/abcde -Vx -G -a "cddb,read,encode,tag,move,clean" -o flac
      '')
    ]);
}