From b241728201a719bb6f2e5db925394159ebf9fc04 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 16 Oct 2021 12:26:45 +0200 Subject: [PATCH] wip --- flake.lock | 14 ++++------- flake.nix | 3 ++- ...r-opus-audio-streams-in-listen-mode.patch} | 6 ++--- .../yuzuru/services/invidious/default.nix | 10 ++------ .../0001-Link-to-patches-in-footer.patch | 24 ------------------- .../services/invidious/patches/README.txt | 5 ---- 6 files changed, 12 insertions(+), 50 deletions(-) rename machines/yuzuru/services/invidious/{patches/0002-Prefer-opus-audio-streams-in-listen-mode.patch => 0001-Prefer-opus-audio-streams-in-listen-mode.patch} (89%) delete mode 100644 machines/yuzuru/services/invidious/patches/0001-Link-to-patches-in-footer.patch delete mode 100644 machines/yuzuru/services/invidious/patches/README.txt diff --git a/flake.lock b/flake.lock index 67ea2ba..049be02 100644 --- a/flake.lock +++ b/flake.lock @@ -246,17 +246,13 @@ "nixpkgs-yuzuru": { "locked": { "lastModified": 1631208211, - "narHash": "sha256-swoOJ7FC5vQMpHw00X3nBPdChhrEwCLzfqesdUzlsKw=", - "owner": "sbruder", - "repo": "nixpkgs", - "rev": "3f4b6302832647bb26517cd0b13289fe1f52dd1f", - "type": "github" + "narHash": "sha256-rJ9Pwd4Ayp5euCLTDkYpfDbaZN/Syz0sY1me90oXqBo=", + "type": "git", + "url": "file:///home/simon/src/nixpkgs" }, "original": { - "owner": "sbruder", - "ref": "invidious", - "repo": "nixpkgs", - "type": "github" + "type": "git", + "url": "file:///home/simon/src/nixpkgs" } }, "root": { diff --git a/flake.nix b/flake.nix index a5ee49f..50f9a3d 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,8 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-yuzuru.url = "github:sbruder/nixpkgs/invidious"; + #nixpkgs-yuzuru.url = "github:sbruder/nixpkgs/invidious"; + nixpkgs-yuzuru.url = "/home/simon/src/nixpkgs"; home-manager.url = "github:nix-community/home-manager/release-21.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/machines/yuzuru/services/invidious/patches/0002-Prefer-opus-audio-streams-in-listen-mode.patch b/machines/yuzuru/services/invidious/0001-Prefer-opus-audio-streams-in-listen-mode.patch similarity index 89% rename from machines/yuzuru/services/invidious/patches/0002-Prefer-opus-audio-streams-in-listen-mode.patch rename to machines/yuzuru/services/invidious/0001-Prefer-opus-audio-streams-in-listen-mode.patch index bd7eb87..a96a910 100644 --- a/machines/yuzuru/services/invidious/patches/0002-Prefer-opus-audio-streams-in-listen-mode.patch +++ b/machines/yuzuru/services/invidious/0001-Prefer-opus-audio-streams-in-listen-mode.patch @@ -1,14 +1,14 @@ -From 04a1f0eaebdfe1fdd1df0629a93a2187091ee0f0 Mon Sep 17 00:00:00 2001 +From 3c692fc4fd5ea7faefc6b6ef63c9b6b20205a1cb Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 9 Sep 2021 16:56:57 +0200 -Subject: [PATCH 2/2] Prefer opus audio streams in listen mode +Subject: [PATCH] Prefer opus audio streams in listen mode --- src/invidious/views/components/player.ecr | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr -index c520fb5a..590cf6c5 100644 +index 6418f66b..73524cfd 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -7,6 +7,16 @@ diff --git a/machines/yuzuru/services/invidious/default.nix b/machines/yuzuru/services/invidious/default.nix index 13314b3..9191bf0 100644 --- a/machines/yuzuru/services/invidious/default.nix +++ b/machines/yuzuru/services/invidious/default.nix @@ -12,8 +12,7 @@ enable = true; package = pkgs.invidious.overrideAttrs (o: o // { patches = (o.patches or [ ]) ++ [ - ./patches/0001-Link-to-patches-in-footer.patch - ./patches/0002-Prefer-opus-audio-streams-in-listen-mode.patch + ./0001-Prefer-opus-audio-streams-in-listen-mode.patch ]; }); nginx.enable = true; @@ -36,6 +35,7 @@ disable_proxy = [ "downloads" ]; # legal precaution local = true; # no external requests use_pubsub_feeds = true; + modified_source_code_url = "https://github.com/sbruder/invidious/tree/patches"; }; extraSettingsFile = config.sops.secrets.invidious-extra-settings.path; }; @@ -44,12 +44,6 @@ locations = { "/robots.txt".return = "200 'User-agent: *\\nDisallow: /'"; "/privacy".return = "301 'https://sbruder.xyz/#privacy'"; - "/patches/" = { - alias = "${./patches}/"; - extraConfig = '' - autoindex on; - ''; - }; }; }; } diff --git a/machines/yuzuru/services/invidious/patches/0001-Link-to-patches-in-footer.patch b/machines/yuzuru/services/invidious/patches/0001-Link-to-patches-in-footer.patch deleted file mode 100644 index 53468c0..0000000 --- a/machines/yuzuru/services/invidious/patches/0001-Link-to-patches-in-footer.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 69c63df2aea003eb6e5dc787ed1bb7d881194d55 Mon Sep 17 00:00:00 2001 -From: Simon Bruder -Date: Thu, 9 Sep 2021 18:46:38 +0200 -Subject: [PATCH 1/2] Link to patches in footer - ---- - src/invidious/views/template.ecr | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr -index 7be95959..5b0d6ca1 100644 ---- a/src/invidious/views/template.ecr -+++ b/src/invidious/views/template.ecr -@@ -120,6 +120,7 @@ - - <%= translate(locale, "Released under the AGPLv3 on Github.") %> - -+ (Patches) - -
- --- -2.31.1 - diff --git a/machines/yuzuru/services/invidious/patches/README.txt b/machines/yuzuru/services/invidious/patches/README.txt deleted file mode 100644 index 9bf0fe9..0000000 --- a/machines/yuzuru/services/invidious/patches/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -These are the patches aplied to this invidious instance. - -They are licensed under the GNU Affero General Public License version 3 as -published by the Free Software Foundation. Its text can be found under -https://www.gnu.org/licenses/agpl-3.0.en.html