feat(koi): navidrome

This commit is contained in:
alina 🌸 2024-08-03 07:09:55 +03:00
parent 710fda269a
commit 6c4a85c94c
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
5 changed files with 73 additions and 0 deletions

View file

@ -26,6 +26,7 @@
./containers/verdaccio
./containers/sharkey
./containers/pds
./containers/navidrome
./containers/zond
./containers/bots/pcre-sub-bot.nix
./vms/hass.nix

View file

@ -0,0 +1,53 @@
{ abs, config, ... } @ inputs:
let
secrets = import (abs "lib/secrets.nix");
UID = 1102;
in {
imports = [
(secrets.declare [{
name = "navidrome-env";
owner = "navidrome";
}])
];
users.groups.navidrome = {};
users.users.navidrome = {
isNormalUser = true;
uid = UID;
};
virtualisation.oci-containers.containers.navidrome = {
image = "deluan/navidrome:0.52.5@sha256:b154aebe8b33bae82c500ad0a3eb743e31da54c3bfb4e7cc3054b9a919b685c7";
volumes = [
"${./navidrome.toml}:/navidrome.toml"
"/mnt/puffer/Downloads/music:/music:ro"
"/mnt/puffer/navidrome:/data"
];
environment = {
ND_CONFIGFILE = "/navidrome.toml";
};
environmentFiles = [
(secrets.file config "navidrome-env")
];
user = builtins.toString UID;
};
systemd.tmpfiles.rules = [
"d /mnt/puffer/navidrome 0755 navidrome navidrome -"
];
services.nginx.virtualHosts."navi.stupid.fish" = {
forceSSL = true;
useACMEHost = "stupid.fish";
locations."/" = {
proxyPass = "http://navidrome.docker:4533/";
extraConfig = ''
proxy_buffering off;
'';
};
};
}

View file

@ -0,0 +1,17 @@
LogLevel = 'DEBUG'
ScanSchedule = '@every 24h'
TranscodingCacheSize = '150MiB'
BaseUrl = 'https://navi.stupid.fish'
EnableSharing = true
EnableTranscodingConfig = true
UILoginBackgroundUrl = 'https://upload.wikimedia.org/wikipedia/en/9/9a/Trollface_non-free.png' # idk why lol
UIWelcomeMessage = 'mrrp meow!'
# values sourced from secret env:
# ND_LASTFM_APIKEY=
# ND_LASTFM_SECRET=
# ND_PASSWORDENCRYPTIONKEY=
# ND_SPOTIFY_ID=
# ND_SPOTIFY_SECRET=

View file

@ -125,9 +125,11 @@ let
};
folders.Public.path = "/mnt/puffer/Public";
folders.Downloads.path = "/mnt/puffer/Downloads";
usersFolders = [
{ username = "guest"; folder = "Public"; }
{ username = "guest"; folder = "Downloads"; }
];
};

BIN
secrets/navidrome-env.age Normal file

Binary file not shown.