Skip to content

Commit

Permalink
Fix to send caddy into the http to run the ./bin/watch-*.sh [issue ke…
Browse files Browse the repository at this point in the history
  • Loading branch information
TumTum committed Mar 2, 2023
1 parent 45e87a4 commit 3defc08
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
let
cfg = config.kellerkinder;

caddyHttps = if (cfg.enableHttps) then "disable_redirects" else "off";

phpConfig = lib.strings.concatStrings [
''
memory_limit = 2G
Expand Down Expand Up @@ -192,6 +194,12 @@ in {
example = [ "mailparse" ];
};

enableHttps = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable HTTPS. If this is active, the scripts ./bin/watch-*.sh will not work.";
};

additionalVhostConfig = lib.mkOption {
type = lib.types.str;
default = "";
Expand Down Expand Up @@ -290,7 +298,7 @@ in {
enable = lib.mkDefault true;
config = ''
{
auto_https disable_redirects
auto_https ${caddyHttps}
}
'';
virtualHosts."127.0.0.1:8000" = lib.mkDefault {
Expand Down

0 comments on commit 3defc08

Please sign in to comment.