summaryrefslogtreecommitdiff
path: root/modules/nixos/hellohtml
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-03-02 17:52:40 +0100
committerLinnnus <[email protected]>2024-03-02 21:44:19 +0100
commitd4f0263d517090d0fe30f7081041dff3fd2cdc77 (patch)
tree32bf2493f3a2cd52ad1b446bc38c9e89515eec18 /modules/nixos/hellohtml
parentcff432ef468fc90092549efaa53f4a1518835f9c (diff)
Bump HelloHTML
It now takes an alternative domain, which was added to it's services.
Diffstat (limited to 'modules/nixos/hellohtml')
-rw-r--r--modules/nixos/hellohtml/default.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/nixos/hellohtml/default.nix b/modules/nixos/hellohtml/default.nix
index cc15779..c70aa99 100644
--- a/modules/nixos/hellohtml/default.nix
+++ b/modules/nixos/hellohtml/default.nix
@@ -34,6 +34,18 @@ in {
type = lib.types.port;
default = 8538;
};
+
+ altDomain = lib.mkOption {
+ description = ''
+ Hellohtml uses two separate domains: one serves the main editor and the
+ other serves the iframe embed. Since the main editor needs to embed the
+ iframe (served at the 2nd domain), the service needs to know the 2nd
+ domain.
+
+ See the source code for more reasoning as to why this is necessary.
+ '';
+ type = lib.types.str;
+ };
};
config = lib.mkIf cfg.enable {
@@ -58,8 +70,8 @@ in {
src = pkgs.fetchFromGitHub {
owner = "linnnus";
repo = "hellohtml";
- rev = "97f00500712d8551d7bbf497ec442083c63384d0";
- hash = "sha256-6nbL2B26dc83F2gSLXadyfS8etuPhhlFy9ivG5l6Tog";
+ rev = "51d2630578928173ea3ae57d97aeb5fa69b0dd7d";
+ hash = "sha256-CAJoxSDQ8AriYRItsd+Hd1j2jI8CDcOF51a+EXV1P6s=";
};
hellohtml-vendor = pkgs.stdenv.mkDerivation {
@@ -83,6 +95,7 @@ in {
export HELLOHTML_DB_PATH="${config.users.users.hellohtml.home}"/hello.db
export HELLOHTML_PORT=${toString cfg.port}
export HELLOHTML_BASE_DIR="${src}"
+ export HELLOHTML_ALT_DOMAIN="${cfg.altDomain}"
${pkgs.unstable.deno}/bin/deno run \
--allow-read=$HELLOHTML_BASE_DIR,$HELLOHTML_DB_PATH,. \