diff --git a/home/apps/mpv.nix b/home/apps/mpv.nix index 77f47e7..c15eb9b 100644 --- a/home/apps/mpv.nix +++ b/home/apps/mpv.nix @@ -4,9 +4,10 @@ then "/secrets/music_stream_password" else "$HOME/.secrets/music_stream_password"; in { - home.packages = with pkgs; [mpv ffmpeg yt-dlp]; + home.packages = with pkgs; [ffmpeg yt-dlp]; programs.mpv = { enable = true; + scripts = with pkgs.mpvScripts; [ mpris ]; config = { script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp"; slang = "en"; diff --git a/hosts/hetzner-vm/profiles/misskey.nix b/hosts/hetzner-vm/profiles/misskey.nix index 6460f99..d92ca6b 100644 --- a/hosts/hetzner-vm/profiles/misskey.nix +++ b/hosts/hetzner-vm/profiles/misskey.nix @@ -138,10 +138,6 @@ in { } ]; ensureDatabases = ["misskey"]; - initialScript = pkgs.writeText "init" '' - create user misskey with password 'password'; - grant all privileges on database misskey to misskey; - ''; }; services.redis.servers."misskey" = { diff --git a/overlay/misskey/default.nix b/overlay/misskey/default.nix index 52f1b6b..bb6c973 100644 --- a/overlay/misskey/default.nix +++ b/overlay/misskey/default.nix @@ -19,11 +19,15 @@ in inherit version src; # some of my own personal patches - # copy-link-non-monospace doesn't do much on https, no idea why - patches = [./copy-link-non-monospace.patch ./reorder-note-menu.patch]; + patches = [ + # Nya! + ./search-allow-query-posts-and-users.patch + ./copy-link-non-monospace.patch + ./reorder-note-menu.patch + ]; installPhase = '' - cp -r $src $out + cp -r . $out ''; meta = with lib; { diff --git a/overlay/misskey/search-allow-query-posts-and-users.patch b/overlay/misskey/search-allow-query-posts-and-users.patch new file mode 100644 index 0000000..2448622 --- /dev/null +++ b/overlay/misskey/search-allow-query-posts-and-users.patch @@ -0,0 +1,40 @@ +diff --git a/packages/client/src/pages/search.vue b/packages/client/src/pages/search.vue +index c080b76..cdfb47c 100644 +--- a/packages/client/src/pages/search.vue ++++ b/packages/client/src/pages/search.vue +@@ -12,12 +12,35 @@ import { computed } from 'vue'; + import XNotes from '@/components/MkNotes.vue'; + import { i18n } from '@/i18n'; + import { definePageMetadata } from '@/scripts/page-metadata'; ++import * as os from '@/os'; ++import { mainRouter } from '@/router'; + + const props = defineProps<{ + query: string; + channel?: string; + }>(); + ++const query = props.query; ++ ++# TODO: get this to work without being logged in ++if (localStorage.getItem('account') != null) { ++ if (query.startsWith('https://') || (query.startsWith('@') && !query.includes(' '))) { ++ const promise = os.api('ap/show', { ++ uri: props.query, ++ }); ++ ++ os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); ++ ++ const res = await promise; ++ ++ if (res.type === 'User') { ++ mainRouter.replace(`/@${res.object.username}@${res.object.host}`); ++ } else if (res.type === 'Note') { ++ mainRouter.replace(`/notes/${res.object.id}`); ++ } ++ } ++} ++ + const pagination = { + endpoint: 'notes/search' as const, + limit: 10,