NixOS system configurations + dotfiles via home-manager

mpv: move settings and commands to module

Changed files
+82 -65
home-manager
-55
home-manager/desktop.nix
··· 32 32 programs.nix-index.enable = true; 33 33 programs.tealdeer.enable = true; 34 34 programs.jq.enable = true; 35 - 36 - programs.mpv.enable = true; 37 - programs.mpv = { 38 - bindings = { }; 39 - scripts = with pkgs.mpvScripts; [ 40 - autocrop 41 - mpris 42 - sponsorblock 43 - 44 - # mutually exclusive osc replacements 45 - thumbnail 46 - # youtube-quality 47 - ]; 48 - config = { 49 - profile = "standard"; 50 - }; 51 - profiles = { 52 - no-term = { 53 - profile = "standard"; 54 - pause = true; 55 - force-window = "immediate"; 56 - terminal = false; 57 - }; 58 - "protocol.https" = { 59 - force-window = "immediate"; 60 - keep-open = true; 61 - }; 62 - "protocol.http" = { 63 - profile = "protocol.https"; 64 - }; 65 - standard = { 66 - cache = true; 67 - audio-display = false; 68 - write-filename-in-watch-later-config = true; 69 - profile = "gpu-hq"; 70 - video-sync = "display-resample"; 71 - interpolation = true; 72 - tscale = "oversample"; 73 - demuxer-mkv-subtitle-preroll = true; 74 - slang = "eng,en,enUS,en-US"; 75 - ytdl-raw-options = "sub-langs=\"en*\",cookies-from-browser=firefox"; 76 - # for thumbnail/youtube-quality 77 - osc = false; 78 - script-opts-append = "autocrop-auto=no"; 79 - }; 80 - }; 81 - }; 82 - 83 - programs.yt-dlp.enable = true; 84 - programs.yt-dlp.settings = { 85 - embed-subs = true; 86 - write-auto-subs = true; 87 - embed-thumbnail = true; 88 - sub-langs = "en*,ja*"; 89 - }; 90 35 }; 91 36 }
-10
home-manager/fish/default.nix
··· 36 36 __git.init 37 37 ''; 38 38 functions = { 39 - yts = { 40 - wraps = "mpv"; 41 - body = "mpv 'ytdl://ytsearch1:'$argv[1] $argv[2..-1]"; 42 - }; 43 - uts = { 44 - wraps = "mpv"; 45 - body = "umpv 'ytdl://ytsearch1:'$argv[1] $argv[2..-1]"; 46 - }; 47 39 session = '' 48 40 if set -q argv[1] 49 41 set -gx fish_history $argv[1] ··· 75 67 "gcpn!" = "git commit -p --no-edit --amend"; 76 68 gcpm = "git commit -p -m"; 77 69 gan = "git annex"; 78 - mshuf = "mpv --no-video --shuffle ~/annex/music"; 79 - pmpv = "umpv (wl-paste)"; 80 70 ls = "eza"; 81 71 l = "eza -l"; 82 72 ll = "eza -l";
+82
home-manager/mpv.nix
··· 1 + { 2 + flake.modules.homeManager.desktop = 3 + { pkgs, ... }: 4 + { 5 + programs.mpv.enable = true; 6 + programs.mpv = { 7 + bindings = { }; 8 + scripts = with pkgs.mpvScripts; [ 9 + autocrop 10 + mpris 11 + sponsorblock 12 + 13 + # mutually exclusive osc replacements 14 + thumbnail 15 + # youtube-quality 16 + ]; 17 + config = { 18 + profile = "standard"; 19 + }; 20 + profiles = { 21 + no-term = { 22 + profile = "standard"; 23 + pause = true; 24 + force-window = "immediate"; 25 + terminal = false; 26 + }; 27 + "protocol.https" = { 28 + force-window = "immediate"; 29 + keep-open = true; 30 + }; 31 + "protocol.http" = { 32 + profile = "protocol.https"; 33 + }; 34 + standard = { 35 + cache = true; 36 + audio-display = false; 37 + write-filename-in-watch-later-config = true; 38 + profile = "gpu-hq"; 39 + video-sync = "display-resample"; 40 + interpolation = true; 41 + tscale = "oversample"; 42 + demuxer-mkv-subtitle-preroll = true; 43 + slang = "eng,en,enUS,en-US"; 44 + ytdl-raw-options = "sub-langs=\"en*\",cookies-from-browser=firefox"; 45 + # for thumbnail/youtube-quality 46 + osc = false; 47 + script-opts-append = "autocrop-auto=no"; 48 + }; 49 + }; 50 + }; 51 + 52 + programs.yt-dlp.enable = true; 53 + programs.yt-dlp.settings = { 54 + embed-subs = true; 55 + write-auto-subs = true; 56 + embed-thumbnail = true; 57 + sub-langs = "en*,ja*"; 58 + }; 59 + 60 + programs.fish = { 61 + shellAbbrs.pmpv = "umpv (wl-paste)"; 62 + functions.yts = { 63 + wraps = "mpv"; 64 + body = "mpv 'ytdl://ytsearch1:'$argv[1] $argv[2..-1]"; 65 + }; 66 + functions.uts = { 67 + wraps = "mpv"; 68 + body = "umpv 'ytdl://ytsearch1:'$argv[1] $argv[2..-1]"; 69 + }; 70 + 71 + functions.m = '' 72 + commandline 'mpv --no-video ~/music/' 73 + set -x fzf_fd_opts -td --exact-depth 2 74 + _fzf_search_directory 75 + ''; 76 + shellAbbrs.mshuf = { 77 + setCursor = true; 78 + expansion = "mpv --shuffle --no-video ~/music/%"; 79 + }; 80 + }; 81 + }; 82 + }