Skip to content

Commit

Permalink
flake: add caddyfile for dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhb committed Dec 31, 2021
1 parent 9160fc3 commit a2c662a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@
enableParallelBuilding = true;
doCheck = false; # FIXME
};
caddyfile = pkgs.writeText "Caddyfile" ''
{
debug
auto_https off
admin 0.0.0.0:2019 {
origins localhost:2019 127.0.0.1:2019 0.0.0.0:2019 *:2019
}
}
http://test.haas.hackclub.com {
respond "It works!"
}
'';
in rec {
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
Expand All @@ -60,6 +72,8 @@
] ++ lib.optional (lib.hasSuffix "darwin" system) [
darwin.apple_sdk.frameworks.Security
];
# save as env var
CADDYFILE_DEV = builtins.toString caddyfile;
};

packages.haas-api = pkgs.callPackage haasApiPackage { inherit system; };
Expand Down

0 comments on commit a2c662a

Please sign in to comment.