Compare commits
No commits in common. "2cdc39f3dcc29090d48d54bc8f24a67303e99ff2" and "3bee0c74028118e2fd93b172178e49a54d31efcf" have entirely different histories.
2cdc39f3dc
...
3bee0c7402
6 changed files with 11 additions and 71 deletions
|
@ -307,8 +307,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
panoramax = {
|
panoramax = {
|
||||||
enable = false;
|
enable = true;
|
||||||
openFirewall = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
qbittorrent = {
|
qbittorrent = {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
./webtoon-dl.nix
|
./webtoon-dl.nix
|
||||||
{};
|
{};
|
||||||
})
|
})
|
||||||
|
# TODO: this package always needs to be called with the --in-process-gpu flag for some reason, can we automate that?
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
prostudiomasters =
|
prostudiomasters =
|
||||||
pkgs.callPackage
|
pkgs.callPackage
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
fetchurl,
|
fetchurl,
|
||||||
appimageTools,
|
appimageTools,
|
||||||
writeShellScript,
|
|
||||||
}: let
|
}: let
|
||||||
pname = "prostudiomasters";
|
pname = "prostudiomasters";
|
||||||
version = "2.5.6";
|
version = "2.5.6";
|
||||||
|
@ -9,25 +8,7 @@
|
||||||
url = "https://download.prostudiomasters.com/linux/ProStudioMasters-${version}.AppImage";
|
url = "https://download.prostudiomasters.com/linux/ProStudioMasters-${version}.AppImage";
|
||||||
hash = "sha256-7owOwdcucFfl+JsVj+Seau2KOz0J4P/ep7WrBSNSmbs=";
|
hash = "sha256-7owOwdcucFfl+JsVj+Seau2KOz0J4P/ep7WrBSNSmbs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create the base AppImage wrapper
|
|
||||||
baseApp = appimageTools.wrapType2 {
|
|
||||||
inherit pname version src;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create a wrapper script that automatically adds the --in-process-gpu flag
|
|
||||||
wrapper = writeShellScript "prostudiomasters-wrapper" ''
|
|
||||||
exec ${baseApp}/bin/prostudiomasters --in-process-gpu "$@"
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
# Override the base app to use our wrapper script
|
appimageTools.wrapType2 {
|
||||||
baseApp.overrideAttrs (oldAttrs: {
|
inherit pname version src;
|
||||||
buildCommand =
|
}
|
||||||
oldAttrs.buildCommand
|
|
||||||
+ ''
|
|
||||||
# Replace the original binary with our wrapper
|
|
||||||
rm $out/bin/prostudiomasters
|
|
||||||
cp ${wrapper} $out/bin/prostudiomasters
|
|
||||||
chmod +x $out/bin/prostudiomasters
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.services.panoramax.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
host = {
|
|
||||||
postgres = {
|
|
||||||
enable = 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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
|
@ -4,6 +4,5 @@
|
||||||
./fail2ban.nix
|
./fail2ban.nix
|
||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
./panoramax.nix
|
./panoramax.nix
|
||||||
./database.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,6 +206,12 @@
|
||||||
# Core Flask configuration
|
# Core Flask configuration
|
||||||
FLASK_APP = "geovisio";
|
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
|
# Storage configuration
|
||||||
FS_URL = config.services.panoramax.settings.storage.fsUrl;
|
FS_URL = config.services.panoramax.settings.storage.fsUrl;
|
||||||
|
|
||||||
|
@ -218,18 +224,6 @@
|
||||||
# Python path to include the panoramax package
|
# Python path to include the panoramax package
|
||||||
PYTHONPATH = "${config.services.panoramax.package}/${pkgs.python3.sitePackages}";
|
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) {
|
// (lib.optionalAttrs (config.services.panoramax.settings.flask.secretKey != null) {
|
||||||
FLASK_SECRET_KEY = config.services.panoramax.settings.flask.secretKey;
|
FLASK_SECRET_KEY = config.services.panoramax.settings.flask.secretKey;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue