add environment file mechanism for secrets
This commit is contained in:
parent
a14933388b
commit
088ac72632
1 changed files with 5 additions and 0 deletions
|
|
@ -19,6 +19,10 @@ in
|
|||
};
|
||||
package = lib.mkPackageOption pkgs "otf" { };
|
||||
pgPackage = lib.mkPackageOption pkgs "postgresql_16" { };
|
||||
environmentFile = lib.mkEnableOption {
|
||||
type = with lib.types; nullOr path;
|
||||
default = lib.types.null;
|
||||
};
|
||||
# this application is configured entirely by environment variables and needs to be exposed
|
||||
environment = lib.mkOption {
|
||||
type =
|
||||
|
|
@ -85,6 +89,7 @@ in
|
|||
WorkingDirectory = cfg.dataDir;
|
||||
ExecStart = "${cfg.package}/bin/otfd";
|
||||
Restart = "on-failure";
|
||||
EnvironmentFile = lib.mkIf (cfg.environment.file != null) cfg.environment.file;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue