add audio module
This commit is contained in:
parent
495d935efd
commit
c04d860150
3 changed files with 18 additions and 0 deletions
16
modules/audio.nix
Normal file
16
modules/audio.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ffmpeg
|
||||
];
|
||||
|
||||
programs.zsh.initContent = ''
|
||||
function flac2aac() {
|
||||
local dir="''${1:-.}"
|
||||
for f in "$dir"/**/*.flac; do
|
||||
[[ -f "$f" ]] && ffmpeg -i "$f" -c:a aac -b:a 256k -movflags +faststart "''${f%.flac}.m4a"
|
||||
done
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue