summaryrefslogtreecommitdiff
path: root/module.nix
diff options
context:
space:
mode:
Diffstat (limited to 'module.nix')
-rw-r--r--module.nix50
1 files changed, 35 insertions, 15 deletions
diff --git a/module.nix b/module.nix
index cf243f9..8ea5cb0 100644
--- a/module.nix
+++ b/module.nix
@@ -11,6 +11,7 @@ self: {
inherit
(lib)
literalExpression
+ literalMd
mdDoc
mkOption
types
@@ -20,6 +21,7 @@ self: {
config,
name,
system,
+ pkgs,
...
}: {
options = {
@@ -34,6 +36,17 @@ self: {
'';
};
+ procRunner = mkOption {
+ type = types.package;
+ default = pkgs.overmind;
+ defaultText = literalMd "pkgs.overmind";
+ description = mdDoc ''
+ The Procfile runner to use. Officially supports: overmind, honcho.
+ If using an unsupported procRunner, the Procfile path will be passed as an argument to the procRunner.
+ '';
+ example = literalExpression "pkgs.honcho";
+ };
+
package = mkOption {
type = types.package;
description = mdDoc "Final package containing runner for Procfile";
@@ -45,27 +58,34 @@ self: {
package = self.lib.${system}.mkProcfileRunner {
inherit name;
procGroup = config.processes;
+ inherit (config) procRunner;
};
};
};
in {
options = {
- perSystem = mkPerSystemOption ({system, ...}: {
- options.procfiles = mkOption {
- type = types.attrsOf (types.submoduleWith {
- modules = [procfileSubmodule];
- specialArgs = {inherit system;};
- });
+ perSystem = mkPerSystemOption ({
+ system,
+ pkgs,
+ ...
+ }: {
+ options = {
+ procfiles = mkOption {
+ type = types.attrsOf (types.submoduleWith {
+ modules = [procfileSubmodule];
+ specialArgs = {inherit system pkgs;};
+ });
- default = {};
- description = mdDoc "Attribute set containing procfile declarations";
- example = literalExpression ''
- {
- daemons.processes = {
- redis = lib.getExe' pkgs.redis "redis-server";
- };
- }
- '';
+ default = {};
+ description = mdDoc "Attribute set containing procfile declarations";
+ example = literalExpression ''
+ {
+ daemons.processes = {
+ redis = lib.getExe' pkgs.redis "redis-server";
+ };
+ }
+ '';
+ };
};
});
};