Skip to content

Commit

Permalink
Add TV7 shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Jun 15, 2024
1 parent 96ca781 commit e046b57
Show file tree
Hide file tree
Showing 5 changed files with 780 additions and 1 deletion.
3 changes: 2 additions & 1 deletion home/roles/multimedia/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ in
];
};

programs.mpv.enable = true;
custom.roles.multimedia.mpv.enable = true;

services.easyeffects.enable = true;
};
}
48 changes: 48 additions & 0 deletions home/roles/multimedia/mpv/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ config, lib, pkgs, ... }:

with lib;

let

cfg = config.custom.roles.multimedia.mpv;

scripts = {
tv7 = pkgs.writeShellScriptBin "tv7"
''
${getExe pkgs.mpv} ${config.xdg.configFile."mpv/playlists".target}/TV7_default.m3u --script-opts=iptv=1
'';
tvsrg = pkgs.writeShellScriptBin "tvsrg"
''
${getExe pkgs.mpv} ${config.xdg.configFile."mpv/playlists".target}/srg-fhd-hls.m3u --script-opts=iptv=1
'';
};

in

{
options = {
custom.roles.multimedia.mpv = {
enable = mkEnableOption "MPV";
};
};

config = mkIf cfg.enable {
home.packages = [
scripts.tv7
scripts.tvsrg
];

programs.mpv.enable = true;

xdg.configFile = {
"mpv/playlists" = {
recursive = true;
source = ./playlists;
};
"mpv/scripts" = {
recursive = true;
source = ./scripts;
};
};
};
}
Loading

0 comments on commit e046b57

Please sign in to comment.