a simple web player for subsonic tinysub.devins.page
subsonic navidrome javascript
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

flake.nix: bundle the entire project into a single html with monolith

at the time of writing, this produces a 134kb single html file. this
file can be plopped on a server to use tinysub.

Signed-off-by: oppiliappan <me@oppi.li>

authored by

oppiliappan and committed by
Tangled
cc5e609b fca3564d

+76
+1
.gitignore
··· 1 1 .direnv 2 2 .DS_Store 3 3 node_modules 4 + result
+25
flake.lock
··· 1 + { 2 + "nodes": { 3 + "nixpkgs": { 4 + "locked": { 5 + "lastModified": 1775403759, 6 + "narHash": "sha256-cGyKiTspHEUx3QwAnV3RfyT+VOXhHLs+NEr17HU34Wo=", 7 + "owner": "NixOS", 8 + "repo": "nixpkgs", 9 + "rev": "5e11f7acce6c3469bef9df154d78534fa7ae8b6c", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "id": "nixpkgs", 14 + "type": "indirect" 15 + } 16 + }, 17 + "root": { 18 + "inputs": { 19 + "nixpkgs": "nixpkgs" 20 + } 21 + } 22 + }, 23 + "root": "root", 24 + "version": 7 25 + }
+50
flake.nix
··· 1 + { 2 + outputs = { 3 + self, 4 + nixpkgs, 5 + }: let 6 + supportedSystems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"]; 7 + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 8 + nixpkgsFor = forAllSystems (system: 9 + import nixpkgs { 10 + inherit system; 11 + }); 12 + in { 13 + packages = forAllSystems (system: let 14 + pkgs = nixpkgsFor."${system}"; 15 + in { 16 + default = pkgs.stdenv.mkDerivation { 17 + pname = "tinysub"; 18 + version = "0.1.0"; 19 + src = ./.; 20 + 21 + nativeBuildInputs = with pkgs; [ 22 + monolith 23 + ]; 24 + 25 + buildPhase = '' 26 + runHook preBuild 27 + 28 + monolith src/index.html -o index.html 29 + 30 + runHook postBuild 31 + ''; 32 + 33 + installPhase = '' 34 + runHook preInstall 35 + 36 + mkdir -p $out 37 + cp index.html $out/ 38 + 39 + runHook postInstall 40 + ''; 41 + }; 42 + }); 43 + 44 + formatter = forAllSystems (system: nixpkgsFor."${system}".alejandra); 45 + 46 + overlays.default = final: prev: { 47 + tinysub = self.packages.${final.system}.default; 48 + }; 49 + }; 50 + }