summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-03-01 13:45:50 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-03-01 13:45:50 +0100
commitaa0b1edf92b7e056e956a46316a9fb2f6d01504b (patch)
tree82372e41d27d61747d006d8723af5249b1dea3cf
parenta3b0302b602dbdb78b2b4b0b2372a2e2d4765132 (diff)
downloadnixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar
nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar.gz
nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar.bz2
nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar.xz
nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.zip
gkleen@sif: ...
-rw-r--r--accounts/gkleen@sif/default.nix4
-rw-r--r--flake.lock12
-rw-r--r--user-profiles/mpv/default.nix120
3 files changed, 76 insertions, 60 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index 118d11d5..a4d9dab6 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -47,7 +47,7 @@ let
47 --prefix PATH : ${pkgs.pulseaudio}/bin 47 --prefix PATH : ${pkgs.pulseaudio}/bin
48 ''; 48 '';
49 }; 49 };
50 wrapElectron = { package, bin ? package.meta.mainProgram or package.pname or pkgs.lib.strings.nameFromURL package.name "-", outBin ? bin }: pkgs.runCommand "${package.name}-wrapped" { buildInputs = with pkgs; [ makeWrapper ]; } '' 50 wrapElectron = { package, bin ? package.meta.mainProgram or package.pname or (pkgs.lib.strings.nameFromURL package.name "-"), outBin ? bin }: pkgs.runCommand "${package.name}-wrapped" { buildInputs = with pkgs; [ makeWrapper ]; } ''
51 mkdir -p "$out/bin" 51 mkdir -p "$out/bin"
52 makeWrapper ${package}/bin/${bin} $out/bin/${outBin} \ 52 makeWrapper ${package}/bin/${bin} $out/bin/${outBin} \
53 --add-flags '--force-device-scale-factor=1.6' 53 --add-flags '--force-device-scale-factor=1.6'
@@ -282,7 +282,7 @@ in {
282 packages = with pkgs; [ 282 packages = with pkgs; [
283 fira fira-code powerline-fonts nerdfonts pavucontrol keepassxc 283 fira fira-code powerline-fonts nerdfonts pavucontrol keepassxc
284 sxiv xclip mumble pulseaudio-ctl pamixer libnotify synergy 284 sxiv xclip mumble pulseaudio-ctl pamixer libnotify synergy
285 xorg.xbacklight screen-message pidgin-with-plugins 285 xorg.xbacklight screen-message
286 google-play-music-desktop-player qt5ct playerctl evince 286 google-play-music-desktop-player qt5ct playerctl evince
287 thunderbird wrappedZulip zoom-us steam steam-run wireshark 287 thunderbird wrappedZulip zoom-us steam steam-run wireshark
288 virt-manager rclone cached-nix-shell xournal xmonad worktime 288 virt-manager rclone cached-nix-shell xournal xmonad worktime
diff --git a/flake.lock b/flake.lock
index 78909d51..a6270724 100644
--- a/flake.lock
+++ b/flake.lock
@@ -46,11 +46,11 @@
46 ] 46 ]
47 }, 47 },
48 "locked": { 48 "locked": {
49 "lastModified": 1645924784, 49 "lastModified": 1645970334,
50 "narHash": "sha256-mpwIohyuc3RAHmVXEm/vUHGMu2V9SLr4P3kh0xckwpI=", 50 "narHash": "sha256-6nn4YF9bPtkxkB7bM6yJO3m//p3sGilxNQFjm1epLEM=",
51 "owner": "nix-community", 51 "owner": "nix-community",
52 "repo": "home-manager", 52 "repo": "home-manager",
53 "rev": "2499b916921adde8a694117bc007efdde8bbd918", 53 "rev": "ea85f4b1fdf3f25cf97dc49f4a9ec4eafda2ea25",
54 "type": "github" 54 "type": "github"
55 }, 55 },
56 "original": { 56 "original": {
@@ -62,11 +62,11 @@
62 }, 62 },
63 "nixpkgs": { 63 "nixpkgs": {
64 "locked": { 64 "locked": {
65 "lastModified": 1645958901, 65 "lastModified": 1646135945,
66 "narHash": "sha256-vcPuKbeJemK+a7Oce4fSMsGt9n99Ogwv/At0Oy/aW6E=", 66 "narHash": "sha256-AjOuxMoIEHI6fSck5Ew6UKW2urIgrIEIcAHOvXjkBA4=",
67 "owner": "NixOS", 67 "owner": "NixOS",
68 "repo": "nixpkgs", 68 "repo": "nixpkgs",
69 "rev": "6896623f630ce8703e2201625eabd9f01dfcc5e0", 69 "rev": "e3c78ec446db310c01504dca6cb7ee4cba0f8a7d",
70 "type": "github" 70 "type": "github"
71 }, 71 },
72 "original": { 72 "original": {
diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix
index 3386ca5f..f6f9b8b2 100644
--- a/user-profiles/mpv/default.nix
+++ b/user-profiles/mpv/default.nix
@@ -20,69 +20,85 @@
20 "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" 20 "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp"
21 ]; 21 ];
22 }; 22 };
23 scripts = let 23 scripts = [
24 reload = pkgs.stdenv.mkDerivation rec { 24 (pkgs.stdenv.mkDerivation rec {
25 version = "2b8a719f"; 25 version = "2b8a719f";
26 pname = "reload"; 26 pname = "reload";
27 name = "${pname}-${version}"; 27 name = "${pname}-${version}";
28 28
29 src = pkgs.fetchFromGitHub { 29 src = pkgs.fetchFromGitHub {
30 owner = "4e6"; 30 owner = "4e6";
31 repo = "mpv-reload"; 31 repo = "mpv-reload";
32 rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86"; 32 rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86";
33 sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg"; 33 sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg";
34 }; 34 };
35
36 installPhase = ''
37 install -d $out/share/mpv/scripts
38 install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName}
39 '';
35 40
36 installPhase = '' 41 passthru.scriptName = "reload.lua";
37 install -d $out/share/mpv/scripts 42 })
38 install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} 43 (pkgs.stdenv.mkDerivation rec {
39 ''; 44 version = "8dd33e2d";
45 pname = "createchapter";
46 name = "${pname}-${version}";
40 47
41 passthru.scriptName = "reload.lua"; 48 src = pkgs.fetchFromGitHub {
49 owner = "shinchiro";
50 repo = "mpv-createchapter";
51 rev = "8dd33e2debbcb963a195ec1371e02c85b49e7faa";
52 hash = "sha256-rPtG7mgf7tOY8Ih4Bz1tpd4MwXOxJmngjY+s70zWX+g=";
42 }; 53 };
43 autosave = pkgs.stdenv.mkDerivation rec {
44 version = "744c3ee6";
45 pname = "autosave";
46 name = "${pname}-${version}.lua";
47 54
48 src = pkgs.fetchzip { 55 installPhase = ''
49 url = "https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef/archive/744c3ee61d2f0a8e9bb4e308dec6897215ae4704.zip"; 56 install -d $out/share/mpv/scripts
50 hash = "sha256-yxA8wgzdS7SyKLoNTWN87ShsBfPKUflbOu4Y0jS2G3I="; 57 install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName}
51 # url = "https://gist.github.com/Hakkin/5489e511bd6c8068a0fc09304c9c5a82/archive/7a19f7cdb6dd0b1c6878b41e13b244e2503c15fc.zip"; 58 '';
52 # sha256 = "0bv9wjrqm2ragd7rp8vw768bja2ghascwlljd6rzzf2ybi10fxs2";
53 };
54 59
55 installPhase = '' 60 passthru.scriptName = "createchapter.lua";
56 install -d $out/share/mpv/scripts 61 })
57 install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} 62 (pkgs.stdenv.mkDerivation rec {
58 ''; 63 version = "744c3ee6";
64 pname = "autosave";
65 name = "${pname}-${version}.lua";
59 66
60 passthru.scriptName = "autosave.lua"; 67 src = pkgs.fetchzip {
68 url = "https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef/archive/744c3ee61d2f0a8e9bb4e308dec6897215ae4704.zip";
69 hash = "sha256-yxA8wgzdS7SyKLoNTWN87ShsBfPKUflbOu4Y0jS2G3I=";
70 # url = "https://gist.github.com/Hakkin/5489e511bd6c8068a0fc09304c9c5a82/archive/7a19f7cdb6dd0b1c6878b41e13b244e2503c15fc.zip";
71 # sha256 = "0bv9wjrqm2ragd7rp8vw768bja2ghascwlljd6rzzf2ybi10fxs2";
61 }; 72 };
62 mpris = pkgs.stdenv.mkDerivation rec {
63 version = "0.4";
64 pname = "mpv-mpris";
65 name = "${pname}-${version}.so";
66
67 src = pkgs.fetchFromGitHub {
68 owner = "hoyon";
69 repo = "mpv-mpris";
70 rev = version;
71 sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i";
72 };
73 73
74 installPhase = '' 74 installPhase = ''
75 install -d $out/share/mpv/scripts 75 install -d $out/share/mpv/scripts
76 install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName} 76 install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName}
77 ''; 77 '';
78 78
79 nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ]; 79 passthru.scriptName = "autosave.lua";
80 })
81 (pkgs.stdenv.mkDerivation rec {
82 version = "0.4";
83 pname = "mpv-mpris";
84 name = "${pname}-${version}.so";
80 85
81 passthru.scriptName = "mpris.so"; 86 src = pkgs.fetchFromGitHub {
87 owner = "hoyon";
88 repo = "mpv-mpris";
89 rev = version;
90 sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i";
82 }; 91 };
83 in [ reload 92
84 autosave 93 installPhase = ''
85 mpris 94 install -d $out/share/mpv/scripts
86 ]; 95 install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName}
96 '';
97
98 nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ];
99
100 passthru.scriptName = "mpris.so";
101 })
102 ];
87 }; 103 };
88} 104}