summaryrefslogtreecommitdiff
path: root/trivionomicon/modules/socialpredict/options.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2026-01-30 00:42:28 -0600
committerAlejandro Soto <alejandro@34project.org>2026-01-31 11:25:56 -0600
commit3e688f113ce6f63e8575447a3827ef7fc24299f8 (patch)
tree0f6a1befd5eddfd9287be1fbbc318a90af87bed7 /trivionomicon/modules/socialpredict/options.nix
parentc426c0fddbcbe3e7113ef2f8b69215e5471c75f0 (diff)
trivionomicon: socialpredict: initial commit
Diffstat (limited to 'trivionomicon/modules/socialpredict/options.nix')
-rw-r--r--trivionomicon/modules/socialpredict/options.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/trivionomicon/modules/socialpredict/options.nix b/trivionomicon/modules/socialpredict/options.nix
new file mode 100644
index 0000000..bb2ad5e
--- /dev/null
+++ b/trivionomicon/modules/socialpredict/options.nix
@@ -0,0 +1,78 @@
+{
+ config,
+ doctrine,
+ lib,
+ modulesPath,
+ pkgs,
+ ...
+}:
+with lib.types; let
+ inherit (pkgs.${doctrine.prefix}) socialpredict;
+in {
+ sys = {
+ frontend = lib.mkOption {
+ type = package;
+ default = socialpredict.frontend;
+ defaultText = "pkgs.\${doctrine.prefix}.frontend";
+ description = "socialpredict frontend package";
+ };
+
+ backend = lib.mkOption {
+ type = package;
+ default = socialpredict.backend;
+ defaultText = "pkgs.\${doctrine.prefix}.backend";
+ description = "socialpredict backend package";
+ };
+
+ package = lib.mkOption {
+ type = package;
+ default = pkgs.${doctrine.prefix}.socialpredict;
+ defaultText = "pkgs.\${doctrine.prefix}.socialpredict";
+ description = "socialpredict package";
+ };
+
+ database = lib.mkOption {
+ type = str;
+ default = "socialpredict";
+ description = "database name";
+ };
+
+ user = lib.mkOption {
+ type = str;
+ default = "socialpredict";
+ description = "user that will run the backend";
+ };
+
+ group = lib.mkOption {
+ type = str;
+ default = "socialpredict";
+ description = "group that will run the backend";
+ };
+
+ backendPort = lib.mkOption {
+ type = port;
+ description = "backend port";
+ };
+
+ initialAdminPassword = lib.mkOption {
+ type = str;
+ default = "change-me";
+ description = "initial password of the 'admin' user";
+ };
+
+ domain = lib.mkOption {
+ type = nullOr str;
+ default = null;
+ description = "domain host";
+ };
+
+ nginx = lib.mkOption {
+ type = submodule (
+ lib.recursiveUpdate (import "${modulesPath}/services/web-servers/nginx/vhost-options.nix" {inherit config lib;}) {}
+ );
+
+ default = {};
+ description = "extra nginx virtual host config";
+ };
+ };
+}