From d2467fe0bd5fb4074ed501ee08ec3680cc46fcf7 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 17 Sep 2022 21:26:16 +0200 Subject: [PATCH] public-cof: add kanboard --- machines/public-cof/configuration.nix | 1 + machines/public-cof/kanboard-config.php | 279 ++++++++++++++++++++++++ machines/public-cof/kanboard.nix | 71 ++++++ 3 files changed, 351 insertions(+) create mode 100644 machines/public-cof/kanboard-config.php create mode 100644 machines/public-cof/kanboard.nix diff --git a/machines/public-cof/configuration.nix b/machines/public-cof/configuration.nix index 7f85263..f4e4dd6 100644 --- a/machines/public-cof/configuration.nix +++ b/machines/public-cof/configuration.nix @@ -17,6 +17,7 @@ ./nginx.nix # ./cryptpad.nix ./hedgedoc.nix + ./kanboard.nix ./secrets ./v6proxy # TODO monitoring diff --git a/machines/public-cof/kanboard-config.php b/machines/public-cof/kanboard-config.php new file mode 100644 index 0000000..9c82452 --- /dev/null +++ b/machines/public-cof/kanboard-config.php @@ -0,0 +1,279 @@ + $out/$f + tail -n+2 ${pkgs.kanboard}/share/kanboard/$f \ + | sed 's^__DIR__^"${pkgs.kanboard}/share/kanboard"^' >> $out/$f + done + ln -s /var/lib/kanboard $out/data + ln -s ${kanboardConfig} $out/config.php + '') + { outPath = "${pkgs.kanboard}/share/kanboard"; meta.priority = 10; } + ]; + }; + locations = { + "/".index = "index.php"; + "~ \\.php$" = { + tryFiles = "$uri =404"; + extraConfig = '' + fastcgi_pass unix:${config.services.phpfpm.pools.kanboard.socket}; + ''; + }; + }; + }; + }; +}