mpv-webm
This commit is contained in:
parent
1405e7f020
commit
c83b9d5d32
13
flake.nix
13
flake.nix
@ -67,8 +67,15 @@
|
||||
};
|
||||
mkConfig = hostname: system: modules: nixlib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
packages = self.packages.${system};
|
||||
};
|
||||
modules = modules ++ [ ./base.nix "${self}/hosts/${hostname}" tmpConfig ({
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
packages = self.packages.${system};
|
||||
};
|
||||
networking.hostName = hostname;
|
||||
networking.domain = "pbsds.net";
|
||||
networking.search = [ "pbsds.net" ];
|
||||
@ -96,6 +103,7 @@
|
||||
inherit inputs;
|
||||
|
||||
packages = forAllSystems({ pkgs, ... }: {
|
||||
mpv-webm = pkgs.callPackage ./pkgs/mpv-webm.nix {};
|
||||
remote-exec = pkgs.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" {};
|
||||
});
|
||||
|
||||
@ -107,9 +115,10 @@
|
||||
sopp = mkConfig "sopp" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel common-gpu-nvidia-nonprime ]);
|
||||
};
|
||||
|
||||
homeConfigurations = forAllSystems ({ pkgs, ... }: let
|
||||
homeConfigurations = forAllSystems ({ pkgs, system, ... }: let
|
||||
mkHome = modules: home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs modules;
|
||||
extraSpecialArgs = { packages = self.packages.${system}; };
|
||||
};
|
||||
in {
|
||||
pbsds = mkHome [ ./users/pbsds/home ];
|
||||
|
28
pkgs/mpv-webm.nix
Normal file
28
pkgs/mpv-webm.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, luaPackages
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "mpv-webm";
|
||||
version = "unstable-2023-02-23";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ekisu";
|
||||
repo = "mpv-webm";
|
||||
rev = "a18375932e39e9b2a40d9c7ab52ea367b41e2558";
|
||||
hash = "sha256-aetkQ1gU/6Yys5FJS/N06ED9tCSvL6BAgUGdNmNmpbU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ luaPackages.moonscript ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/mpv/scripts
|
||||
install -m 644 build/webm.lua $out/share/mpv/scripts/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.scriptName = "webm.lua";
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, packages, ... }:
|
||||
{
|
||||
#home.packages = with pkgs; [ mpv ];
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
programs.mpv.bindings."SHIFT+n" = "sub-seek -1";
|
||||
programs.mpv.bindings."b" = ''cycle-values audio-channels 2 "auto"'';
|
||||
|
||||
#programs.mpv.scripts = with pkgs.mpvScripts; [ thumbnail mpris ];
|
||||
programs.mpv.scripts = with pkgs.mpvScripts; [
|
||||
#thumbnail # TOO SLOW
|
||||
#mpris
|
||||
# TODO: thumbfast
|
||||
packages.mpv-webm # activate with SHIFT+w
|
||||
];
|
||||
#programs.mpv.config.osc = "no"; # likely a 'thumbnail' requirement
|
||||
|
||||
#https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||||
|
Loading…
Reference in New Issue
Block a user