-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmedia.nix
executable file
·82 lines (75 loc) · 2.35 KB
/
media.nix
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{ lib, config, pkgs, ... }:
with lib;
let
openaudible =
let
name = "openaudible";
version = "3.5.7";
description = "A cross-platform desktop application for downloading and managing your Audible audiobooks.";
desktopItem = pkgs.makeDesktopItem {
name = "OpenAudible";
exec = name;
icon = "OpenAudible";
comment = description;
desktopName = "OpenAudible";
genericName = "Audible content downloader";
categories = [ "AudioVideo" "Audio" ];
};
appimageContents = pkgs.appimageTools.extract {
inherit name src;
};
src = pkgs.fetchurl {
url = "https://github.com/openaudible/openaudible/releases/download/v${version}/OpenAudible_${version}_x86_64.AppImage";
sha256 = "1hpcz6hdyz8i28sqzwd42h26b8bnadpbxvh70nyh4r9ywvjsysgp";
};
in
pkgs.appimageTools.wrapType1 rec {
inherit name src;
extraInstallCommands = ''
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications
#cp -r ${appimageContents}/usr/share/icons/ $out/share/
'';
meta = with lib; {
description = description;
homepage = "https://openaudible.org/";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ WhittlesJr ];
platforms = [ "x86_64-linux" ];
};
};
in
{
options.my = {
role.mediaArchival = mkEnableOption "Managing and archiving A/V media";
};
config = mkIf config.my.role.mediaArchival {
environment.systemPackages = with pkgs; [
vlc # Vido + audio playing
audacity # Audio recording and editing
makemkv # Blu-ray / DVD ripping
ccextractor # For makemkv
mkvtoolnix
whipper
picard # Music library management
handbrake # Video compression
android-file-transfer
#openaudible
(appimage-run.override {
extraPkgs = pkgs: [ pkgs.libthai ];
})
audible-cli
];
# Adds blu-ray support to VLC
#nixpkgs.overlays = [
# (
# self: super: {
# libbluray = super.libbluray.override {
# withAACS = true;
# withBDplus = true;
# };
# }
# )
#];
};
}