Add navidrome service
Initial testing config for navidrome, may need to update after trying it
This commit is contained in:
parent
28030867d1
commit
74d34f9e62
|
@ -249,6 +249,7 @@
|
|||
serviceModules = [
|
||||
./services/adguardhome/default.nix
|
||||
./services/gitea/default.nix
|
||||
./services/navidrome/default.nix
|
||||
./services/nextcloud/default.nix
|
||||
./services/ntfy-sh/default.nix
|
||||
./services/sshd/default.nix
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, config, ... }:
|
||||
let baseUrl = "https://matrix.xenia.me.uk";
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
baseUrl = "matrix.xenia.me.uk";
|
||||
port = 8008;
|
||||
in {
|
||||
imports = [ ../traefik/default.nix ];
|
||||
services.postgresql.enable = true;
|
||||
|
@ -11,16 +13,17 @@ in {
|
|||
LC_CTYPE = "C";
|
||||
'';
|
||||
|
||||
services.matrix-synapse = {
|
||||
services = {
|
||||
matrix-synapse = {
|
||||
enable = true;
|
||||
settings.server_name = baseUrl;
|
||||
settings.server_name = "https://${baseUrl}";
|
||||
# The public base URL value must match the `base_url` value set in `clientConfig` above.
|
||||
# The default value here is based on `server_name`, so if your `server_name` is different
|
||||
# from the value of `fqdn` above, you will likely run into some mismatched domain names
|
||||
# in client applications.
|
||||
settings.public_baseurl = baseUrl;
|
||||
settings.public_baseurl = "https://${baseUrl}";
|
||||
settings.listeners = [{
|
||||
port = 8008;
|
||||
inherit port;
|
||||
bind_addresses = [ "::1" ];
|
||||
type = "http";
|
||||
tls = false;
|
||||
|
@ -31,9 +34,7 @@ in {
|
|||
}];
|
||||
}];
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions = {
|
||||
http = {
|
||||
traefik.dynamicConfigOptions.http = {
|
||||
routers.gitea = {
|
||||
rule = "Host(`${baseUrl}`)";
|
||||
entryPoints = [ "http" "https" ];
|
||||
|
@ -41,7 +42,7 @@ in {
|
|||
tls = { certResolver = "default"; };
|
||||
};
|
||||
services.synapse-service.loadBalancer.servers =
|
||||
[{ url = "http://localhost:8008"; }];
|
||||
[{ url = "http://localhost:${port}"; }];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
26
services/navidrome/default.nix
Normal file
26
services/navidrome/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, ... }:
|
||||
let baseUrl = "music.xenia.me.uk";
|
||||
in {
|
||||
imports = [ ../traefik/default.nix ];
|
||||
environment.systemPackages = with pkgs; [ ffmpeg ];
|
||||
services = rec {
|
||||
navidrome = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Address = "127.0.0.1";
|
||||
BaseUrl = "https://${baseUrl}";
|
||||
Port = 4533;
|
||||
};
|
||||
};
|
||||
traefik.dynamicConfigOptions.http = {
|
||||
routers.navidrome = {
|
||||
rule = "Host(`${baseUrl}`)";
|
||||
entryPoints = [ "http" "https" ];
|
||||
service = "synapse-service";
|
||||
tls = { certResolver = "default"; };
|
||||
};
|
||||
services.navidrome.loadBalancer.servers =
|
||||
[{ url = "http://localhost:${navidrome.settings.port}"; }];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue