nixos-config

NixOS configs for my systems
Log | Files | Refs

commit 750cf5eba12696925c974ddb4b076aac0cb86586
parent a692fa82c92411780998d65b316b9a2bb2b20837
Author: vin <vin@vineetk.net>
Date:   Sat,  8 Mar 2025 19:00:42 -0500

demiurge: add invidious overlay and move nixpkgs config to top

invidious overlay is to remove shorts from home/popular and
subscriptions page.

Diffstat:
Mhosts/demiurge/default.nix | 48+++++++++++++++++++++++++++++++++---------------
1 file changed, 33 insertions(+), 15 deletions(-)

diff --git a/hosts/demiurge/default.nix b/hosts/demiurge/default.nix @@ -7,6 +7,39 @@ home-manager.nixosModules.default ]; + # nixpkgs stuff + nixpkgs = { + config = { + # selectively allow unfree packages + allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "quartus-prime-lite" + "quartus-prime-lite-unwrapped" + "steam" + "steam-unwrapped" + ]; + + # selectively allow insecure packages + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "aspnetcore-runtime-6.0.36" + ]; + }; + + overlays = [ + (self: super: { + invidious = super.invidious.overrideAttrs (old: { + # try removing shorts by ignoring any videos shorter than 65 seconds + postPatch = old.postPatch + '' + sed -i '/GROUP BY channel/a\ AND length_seconds > 65' src/invidious/database/channels.cr + sed -i 's/\({view_name}\) \(ORDER BY published\)/\1 WHERE length_seconds > 65 \2/' src/invidious/users.cr + sed -i 's/\({values})\) \(ORDER BY published\)/\1 AND length_seconds > 65 \2/' src/invidious/users.cr + ''; + }); + }) + ]; + }; + # decrypt agenix secrets age.secrets = { tailscale_demiurge = { @@ -104,21 +137,6 @@ ]; }; - # selectively allow unfree packages - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "quartus-prime-lite" - "quartus-prime-lite-unwrapped" - "steam" - "steam-unwrapped" - ]; - - # selectively allow insecure packages - nixpkgs.config.permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "aspnetcore-runtime-6.0.36" - ]; - # default packages for both me and root environment = { systemPackages = with pkgs; [