{ lib, pkgs, ... }: let domain = "music.giugl.io"; network = import ./network.nix; in { services = { navidrome = { enable = true; settings = { MusicFolder = "/media/Music"; LastFM.enable = true; LastFM.ApiKey = "5cef5cb5f9d31326b97d0f929ca9cf20"; LastFM.Secret = "d1296896126f4caae47407aecf080b25"; Spotify.ID = "3900c029b4f34f3fb61d554dda64794d"; Spotify.Secret = "d931ce5575a9401aa5ff8d37558cca0a"; EnableGravatar = true; LogLevel = "WARN"; }; }; nginx.virtualHosts.${domain} = { forceSSL = true; enableACME = true; locations."/" = { proxyPass = "http://localhost:4533"; # extraConfig = '' # allow 10.0.0.0/24; # ${lib.concatMapStrings (x: "allow ${x};") network.gdevices-wg} # deny all; # ''; }; }; }; systemd.services."beets-rename" = { enable = true; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.findutils}/bin/find /media/Music -type d -mindepth 2 -maxdepth 2 -exec ${pkgs.beets}/bin/beet -c /media/config.conf import --flat -q {} \\;"; }; startAt = "daily"; }; networking.extraHosts = '' ${network.architect-lan} ${domain} ${network.architect-wg} ${domain} ''; users.groups.media.members = [ "navidrome" ]; }