fix: disabled broken panoramax config
This commit is contained in:
parent
333c68a8cd
commit
2cdc39f3dc
3 changed files with 29 additions and 18 deletions
|
@ -307,7 +307,7 @@
|
|||
};
|
||||
|
||||
panoramax = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -11,19 +11,24 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.host.postgres.enable {
|
||||
host = {
|
||||
postgres = {
|
||||
extraUsers = {
|
||||
${config.services.panoramax.database.user} = {
|
||||
isClient = true;
|
||||
(
|
||||
lib.mkIf config.host.postgres.enable {
|
||||
host = {
|
||||
postgres = {
|
||||
extraUsers = {
|
||||
${config.services.panoramax.database.user} = {
|
||||
isClient = true;
|
||||
createUser = true;
|
||||
};
|
||||
};
|
||||
extraDatabases = {
|
||||
${config.services.panoramax.database.name} = {
|
||||
name = config.services.panoramax.database.user;
|
||||
};
|
||||
};
|
||||
};
|
||||
extraDatabases = {
|
||||
${config.services.panoramax.database.name} = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
}
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -206,12 +206,6 @@
|
|||
# Core Flask configuration
|
||||
FLASK_APP = "geovisio";
|
||||
|
||||
# Database configuration
|
||||
DB_HOST = config.services.panoramax.database.host;
|
||||
DB_PORT = toString config.services.panoramax.database.port;
|
||||
DB_USERNAME = config.services.panoramax.database.user;
|
||||
DB_NAME = config.services.panoramax.database.name;
|
||||
|
||||
# Storage configuration
|
||||
FS_URL = config.services.panoramax.settings.storage.fsUrl;
|
||||
|
||||
|
@ -224,6 +218,18 @@
|
|||
# Python path to include the panoramax package
|
||||
PYTHONPATH = "${config.services.panoramax.package}/${pkgs.python3.sitePackages}";
|
||||
}
|
||||
// (
|
||||
if config.services.panoramax.database.host == "/run/postgresql"
|
||||
then {
|
||||
DB_URL = "postgresql://${config.services.panoramax.database.user}@/${config.services.panoramax.database.name}?host=/run/postgresql";
|
||||
}
|
||||
else {
|
||||
DB_HOST = config.services.panoramax.database.host;
|
||||
DB_PORT = toString config.services.panoramax.database.port;
|
||||
DB_USERNAME = config.services.panoramax.database.user;
|
||||
DB_NAME = config.services.panoramax.database.name;
|
||||
}
|
||||
)
|
||||
// (lib.optionalAttrs (config.services.panoramax.settings.flask.secretKey != null) {
|
||||
FLASK_SECRET_KEY = config.services.panoramax.settings.flask.secretKey;
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue