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 = [
|
serviceModules = [
|
||||||
./services/adguardhome/default.nix
|
./services/adguardhome/default.nix
|
||||||
./services/gitea/default.nix
|
./services/gitea/default.nix
|
||||||
|
./services/navidrome/default.nix
|
||||||
./services/nextcloud/default.nix
|
./services/nextcloud/default.nix
|
||||||
./services/ntfy-sh/default.nix
|
./services/ntfy-sh/default.nix
|
||||||
./services/sshd/default.nix
|
./services/sshd/default.nix
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
let baseUrl = "https://matrix.xenia.me.uk";
|
let
|
||||||
|
baseUrl = "matrix.xenia.me.uk";
|
||||||
|
port = 8008;
|
||||||
in {
|
in {
|
||||||
imports = [ ../traefik/default.nix ];
|
imports = [ ../traefik/default.nix ];
|
||||||
services.postgresql.enable = true;
|
services.postgresql.enable = true;
|
||||||
|
@ -11,29 +13,28 @@ in {
|
||||||
LC_CTYPE = "C";
|
LC_CTYPE = "C";
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.matrix-synapse = {
|
services = {
|
||||||
enable = true;
|
matrix-synapse = {
|
||||||
settings.server_name = baseUrl;
|
enable = true;
|
||||||
# The public base URL value must match the `base_url` value set in `clientConfig` above.
|
settings.server_name = "https://${baseUrl}";
|
||||||
# The default value here is based on `server_name`, so if your `server_name` is different
|
# The public base URL value must match the `base_url` value set in `clientConfig` above.
|
||||||
# from the value of `fqdn` above, you will likely run into some mismatched domain names
|
# The default value here is based on `server_name`, so if your `server_name` is different
|
||||||
# in client applications.
|
# from the value of `fqdn` above, you will likely run into some mismatched domain names
|
||||||
settings.public_baseurl = baseUrl;
|
# in client applications.
|
||||||
settings.listeners = [{
|
settings.public_baseurl = "https://${baseUrl}";
|
||||||
port = 8008;
|
settings.listeners = [{
|
||||||
bind_addresses = [ "::1" ];
|
inherit port;
|
||||||
type = "http";
|
bind_addresses = [ "::1" ];
|
||||||
tls = false;
|
type = "http";
|
||||||
x_forwarded = true;
|
tls = false;
|
||||||
resources = [{
|
x_forwarded = true;
|
||||||
names = [ "client" "federation" ];
|
resources = [{
|
||||||
compress = true;
|
names = [ "client" "federation" ];
|
||||||
|
compress = true;
|
||||||
|
}];
|
||||||
}];
|
}];
|
||||||
}];
|
};
|
||||||
};
|
traefik.dynamicConfigOptions.http = {
|
||||||
|
|
||||||
services.traefik.dynamicConfigOptions = {
|
|
||||||
http = {
|
|
||||||
routers.gitea = {
|
routers.gitea = {
|
||||||
rule = "Host(`${baseUrl}`)";
|
rule = "Host(`${baseUrl}`)";
|
||||||
entryPoints = [ "http" "https" ];
|
entryPoints = [ "http" "https" ];
|
||||||
|
@ -41,7 +42,7 @@ in {
|
||||||
tls = { certResolver = "default"; };
|
tls = { certResolver = "default"; };
|
||||||
};
|
};
|
||||||
services.synapse-service.loadBalancer.servers =
|
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