17 lines
381 B
Nix
17 lines
381 B
Nix
{pkgs, ...}: let
|
|
script = pkgs.runCommand "autosave.lua" {passthru.scriptName = "autosave.lua";} ''
|
|
mkdir -p $out/share/mpv/scripts/
|
|
ln -s ${./autosave.lua} $out/share/mpv/scripts/autosave.lua
|
|
'';
|
|
in {
|
|
programs.mpv = {
|
|
enable = true;
|
|
config = {
|
|
save-position-on-quit = true;
|
|
};
|
|
scripts = [
|
|
pkgs.mpvScripts.mpris
|
|
script
|
|
];
|
|
};
|
|
}
|