Compare commits
3 commits
3bee0c7402
...
2cdc39f3dc
Author | SHA1 | Date | |
---|---|---|---|
2cdc39f3dc | |||
333c68a8cd | |||
7e6fa744af |
6 changed files with 71 additions and 11 deletions
|
@ -307,7 +307,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
panoramax = {
|
panoramax = {
|
||||||
enable = true;
|
enable = false;
|
||||||
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
qbittorrent = {
|
qbittorrent = {
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
./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,6 +1,7 @@
|
||||||
{
|
{
|
||||||
fetchurl,
|
fetchurl,
|
||||||
appimageTools,
|
appimageTools,
|
||||||
|
writeShellScript,
|
||||||
}: let
|
}: let
|
||||||
pname = "prostudiomasters";
|
pname = "prostudiomasters";
|
||||||
version = "2.5.6";
|
version = "2.5.6";
|
||||||
|
@ -8,7 +9,25 @@
|
||||||
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=";
|
||||||
};
|
};
|
||||||
in
|
|
||||||
appimageTools.wrapType2 {
|
# Create the base AppImage wrapper
|
||||||
|
baseApp = appimageTools.wrapType2 {
|
||||||
inherit pname version src;
|
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
|
||||||
|
# Override the base app to use our wrapper script
|
||||||
|
baseApp.overrideAttrs (oldAttrs: {
|
||||||
|
buildCommand =
|
||||||
|
oldAttrs.buildCommand
|
||||||
|
+ ''
|
||||||
|
# Replace the original binary with our wrapper
|
||||||
|
rm $out/bin/prostudiomasters
|
||||||
|
cp ${wrapper} $out/bin/prostudiomasters
|
||||||
|
chmod +x $out/bin/prostudiomasters
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
|
34
modules/nixos-modules/server/panoramax/database.nix
Normal file
34
modules/nixos-modules/server/panoramax/database.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
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,5 +4,6 @@
|
||||||
./fail2ban.nix
|
./fail2ban.nix
|
||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
./panoramax.nix
|
./panoramax.nix
|
||||||
|
./database.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,12 +206,6 @@
|
||||||
# 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;
|
||||||
|
|
||||||
|
@ -224,6 +218,18 @@
|
||||||
# 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