2024-03-06 14:44:18 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-03-06 13:04:44 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [3000 80];
|
2024-03-01 12:58:02 +01:00
|
|
|
imports = [./your_spotify_m.nix];
|
2024-03-06 13:04:44 +01:00
|
|
|
age.secrets.spotifySecret = {
|
|
|
|
owner = "root";
|
2024-03-02 12:52:56 +01:00
|
|
|
mode = "440";
|
2024-03-06 13:04:44 +01:00
|
|
|
rekeyFile = config.node.secretsDir + "/spotifySecret.age";
|
|
|
|
};
|
|
|
|
age.secrets.spotifyPublic = {
|
|
|
|
owner = "root";
|
|
|
|
mode = "440";
|
|
|
|
rekeyFile = config.node.secretsDir + "/spotifyPublic.age";
|
2024-03-01 12:58:02 +01:00
|
|
|
};
|
|
|
|
services.your_spotify = {
|
2024-03-06 13:04:44 +01:00
|
|
|
enable = true;
|
|
|
|
spotifySecretFile = config.age.secrets.spotifySecret.path;
|
|
|
|
spotifyPublicFile = config.age.secrets.spotifyPublic.path;
|
2024-03-02 12:52:56 +01:00
|
|
|
settings = {
|
2024-03-06 13:04:44 +01:00
|
|
|
CLIENT_ENDPOINT = "https://sptfy.${config.secrets.secrets.global.domains.web}";
|
|
|
|
API_ENDPOINT = "https://apisptfy.${config.secrets.secrets.global.domains.web}";
|
2024-03-06 18:34:25 +01:00
|
|
|
MONGO_NO_ADMIN_RIGHTS = false;
|
2024-03-01 12:58:02 +01:00
|
|
|
};
|
2024-03-02 12:52:56 +01:00
|
|
|
enableLocalDB = true;
|
2024-03-06 14:44:18 +01:00
|
|
|
nginxVirtualHost = "sptfy.${config.secrets.secrets.global.domains.web}";
|
2024-03-01 12:58:02 +01:00
|
|
|
};
|
|
|
|
environment.persistence."/persist".directories = [
|
|
|
|
{
|
2024-03-02 10:22:02 +01:00
|
|
|
inherit (config.services.mongodb) user;
|
2024-03-01 12:58:02 +01:00
|
|
|
directory = config.services.mongodb.dbpath;
|
|
|
|
}
|
|
|
|
];
|
2024-03-06 14:44:18 +01:00
|
|
|
services.mongodb.package = pkgs.mongodb-bin;
|
2024-03-01 12:58:02 +01:00
|
|
|
}
|