summaryrefslogtreecommitdiff
path: root/trivionomicon/modules/socialpredict/options.nix
blob: bb2ad5ebb54d2c3fda71035dc9ccbacd2959c15f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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";
    };
  };
}