feat: added per service enable options for reverseProxy configs
This commit is contained in:
parent
7f74060713
commit
ecec04a9ce
8 changed files with 52 additions and 8 deletions
|
|
@ -8,6 +8,10 @@
|
|||
in {
|
||||
options.services.forgejo = {
|
||||
reverseProxy = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.services.forgejo.enable && config.services.reverseProxy.enable;
|
||||
};
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "domain that forgejo will be hosted at";
|
||||
|
|
@ -21,7 +25,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.services.forgejo.enable && config.services.reverseProxy.enable) {
|
||||
config = lib.mkIf config.services.forgejo.reverseProxy.enable {
|
||||
services.reverseProxy.services.forgejo = {
|
||||
target = "http://localhost:${toString httpPort}";
|
||||
domain = config.services.forgejo.reverseProxy.domain;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue