diff options
Diffstat (limited to 'systems/eldiron/websites/tools/webhooks.nix')
-rw-r--r-- | systems/eldiron/websites/tools/webhooks.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/systems/eldiron/websites/tools/webhooks.nix b/systems/eldiron/websites/tools/webhooks.nix new file mode 100644 index 0000000..337c8f8 --- /dev/null +++ b/systems/eldiron/websites/tools/webhooks.nix | |||
@@ -0,0 +1,25 @@ | |||
1 | { lib, env, binEnv }: | ||
2 | { | ||
3 | keys = lib.attrsets.mapAttrs' (k: v: | ||
4 | lib.nameValuePair "webapps/webhooks/${k}.php" { | ||
5 | user = "wwwrun"; | ||
6 | group = "wwwrun"; | ||
7 | permissions = "0400"; | ||
8 | text = builtins.replaceStrings ["{{webhooks-bin-env}}"] [ "${binEnv}" ] v; | ||
9 | keyDependencies = [ binEnv ]; | ||
10 | }) env // lib.attrsets.mapAttrs' (k: v: | ||
11 | lib.nameValuePair "webapps/webhooks/${k}/index.php" { | ||
12 | user = "wwwrun"; | ||
13 | group = "wwwrun"; | ||
14 | permissions = "0400"; | ||
15 | text = builtins.replaceStrings ["{{webhooks-bin-env}}"] [ "${binEnv}" ] v; | ||
16 | keyDependencies = [ binEnv ]; | ||
17 | }) env // { | ||
18 | "webapps/webhooks" = { | ||
19 | isDir = true; | ||
20 | user = "wwwrun"; | ||
21 | group = "wwwrun"; | ||
22 | permissions = "0500"; | ||
23 | }; | ||
24 | }; | ||
25 | } | ||