From c5cb622d024cbda87711d83f8ad1214312d397e4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 30 Sep 2023 23:21:24 +0300 Subject: feat(tazjin/koptevo): run gonic on music.tazj.in Change-Id: Id281142e59647d9db02f64a352cba768d4d83237 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9497 Reviewed-by: tazjin Tested-by: BuildkiteCI --- users/tazjin/nixos/koptevo/default.nix | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'users/tazjin/nixos/koptevo') diff --git a/users/tazjin/nixos/koptevo/default.nix b/users/tazjin/nixos/koptevo/default.nix index 11bbfde138aa..0753f6ff5a0a 100644 --- a/users/tazjin/nixos/koptevo/default.nix +++ b/users/tazjin/nixos/koptevo/default.nix @@ -112,8 +112,8 @@ in services.depot.automatic-gc = { enable = true; interval = "daily"; - diskThreshold = 2; # GiB # TODO - maxFreed = 8; # GiB + diskThreshold = 15; # GiB + maxFreed = 10; # GiB preserveGenerations = "14d"; }; @@ -128,6 +128,32 @@ in ''; }; + # I don't use the podcast feature, but I *have to* supply podcasts + # to gonic ... + systemd.tmpfiles.rules = [ + "d /tmp/fake-podcasts 0555 nobody nobody -" + ]; + + services.gonic = { + enable = true; + settings = { + listen-addr = "0.0.0.0:4747"; + scan-interval = 5; + scan-at-start-enabled = true; + podcast-path = [ "/tmp/fake-podcasts" ]; + music-path = [ "/var/lib/geesefs/tazjins-files/music" ]; + }; + }; + + services.nginx.virtualHosts."music.tazj.in" = { + addSSL = true; + enableACME = true; + + locations."/" = { + proxyPass = "http://127.0.0.1:4747"; + }; + }; + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ -- cgit 1.4.1