summary refs log tree commit diff
path: root/mixins/multimedia.nix
blob: 9b82a4fce0bdec667ddb5c828f211140478fff74 (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
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
{
  pkgs,
  lib,
  config,
  inputs,
  ...
}: {
  config = {
    home-manager.users.tzlil = {config, ...}: {
      fonts.fontconfig.enable = true;
      home.packages = with pkgs; [
        ffmpeg
        gimp
        transmission
        xdg-utils
        xdg-user-dirs
      ];
      xdg = {
        enable = true;
        mime.enable = true;
        mimeApps = {
          enable = true;
          defaultApplications = {
            "application/pdf" = ["${pkgs.zathura}/share/applications/org.pwmt.zathura.desktop"];
            "image/png" = ["${pkgs.swayimg}/share/applications/swayimg.desktop"];
            "image/jpeg" = ["${pkgs.swayimg}/share/applications/swayimg.desktop"];
          };
        };
        userDirs = {
          createDirectories = true;
          desktop = "${config.home.homeDirectory}/desktop";
          download = "${config.home.homeDirectory}/downloads";
        };
        #portal = {
        #  enable = true;
        #  extraPortals = with pkgs; [
        #    xdg-desktop-portal-wlr
        #    xdg-desktop-portal-gtk
        #  ];
        #};
      };

      programs = {
        mpv = {
          enable = true;
          scripts = with pkgs.mpvScripts; [
            mpris
            #youtube-quality
            (pkgs.callPackage ./youtube-quality.nix {})
          ];
          config = {
            sub-auto = "fuzzy";
            ytdl-raw-options = "write-auto-sub=,sub-lang=en";
          };
        };
        zathura = {
          enable = true;
          options = {
            selection-clipboard = "clipboard";
          };
        };
      };
    };
  };
}