diff options
author | Jill <kokakiwi@deuxfleurs.fr> | 2024-07-22 17:04:09 +0000 |
---|---|---|
committer | Jill <kokakiwi@deuxfleurs.fr> | 2024-07-22 17:04:09 +0000 |
commit | 6c88813e8d6830a1fdd7b98de7e863a4f6f5e55c (patch) | |
tree | f7f4b9465e060ae4d27b60d4edfedf9475b24630 /cluster/prod/app | |
parent | 7c9fed9e99a262cfb4742b1e0034f4f14dd8dacb (diff) | |
parent | 0cc08a1f2bcd138943865cc285c9a445c7234b12 (diff) | |
download | nixcfg-6c88813e8d6830a1fdd7b98de7e863a4f6f5e55c.tar.gz nixcfg-6c88813e8d6830a1fdd7b98de7e863a4f6f5e55c.zip |
Merge pull request 'Update CryptPad to 2024.6.0' (#31) from KokaKiwi/nixcfg:crytptpad-upgrade-2024.6.0 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/nixcfg/pulls/31
Diffstat (limited to 'cluster/prod/app')
-rw-r--r-- | cluster/prod/app/cryptpad/build/default.nix | 20 | ||||
-rw-r--r-- | cluster/prod/app/cryptpad/build/deuxfleurs.nix | 4 | ||||
-rw-r--r-- | cluster/prod/app/cryptpad/build/npins/sources.json | 6 | ||||
-rw-r--r-- | cluster/prod/app/cryptpad/config/config.js | 6 | ||||
-rw-r--r-- | cluster/prod/app/cryptpad/deploy/cryptpad.hcl | 2 |
5 files changed, 30 insertions, 8 deletions
diff --git a/cluster/prod/app/cryptpad/build/default.nix b/cluster/prod/app/cryptpad/build/default.nix index c853a38..83296d5 100644 --- a/cluster/prod/app/cryptpad/build/default.nix +++ b/cluster/prod/app/cryptpad/build/default.nix @@ -3,6 +3,7 @@ , buildNpmPackage , fetchFromGitHub +, fetchzip , nodejs @@ -40,6 +41,14 @@ pname = "${pname}-onlyoffice"; inherit version; + x2t = let + version = "v7.3+1"; + in fetchzip { + url = "https://github.com/cryptpad/onlyoffice-x2t-wasm/releases/download/${version}/x2t.zip"; + hash = "sha256-d5raecsTOflo0UpjSEZW5lker4+wdkTb6IyHNq5iBg8="; + stripRoot = false; + }; + srcs = lib.mapAttrsToList (version: { rev, hash ? lib.fakeHash }: fetchFromGitHub { name = "${final.pname}-${version}-source"; owner = "cryptpad"; @@ -57,20 +66,21 @@ (version: "cp -Tr ${final.pname}-${version}-source $out/${version}") (builtins.attrNames onlyOfficeVersions) )} + cp -Tr $x2t $out/x2t ''; }); in buildNpmPackage rec { pname = "cryptpad"; - version = "2024.3.1"; + version = "2024.6.0"; src = fetchFromGitHub { owner = "cryptpad"; repo = "cryptpad"; rev = version; - hash = "sha256-kXghuktaKicFOz98Siy/OjJ9rlgy6C2BTKkD2OFLE+k="; + hash = "sha256-huIhhnjatkaVfm1zDeqi88EX/nAUBQ0onPNOwn7hrX4="; }; - npmDepsHash = "sha256-fjImdtv0bwgdDvl/BXV0DesreOAW2u8HsNqJ13hrJMw="; + npmDepsHash = "sha256-Oh1fBvP7OXC+VDiH3D+prHmi8pRrxld06n30sqw5apY="; inherit nodejs; @@ -107,6 +117,10 @@ in buildNpmPackage rec { runHook postInstall ''; + passthru = { + inherit onlyOffice; + }; + meta = { description = "Collaborative office suite, end-to-end encrypted and open-source."; homepage = "https://cryptpad.org"; diff --git a/cluster/prod/app/cryptpad/build/deuxfleurs.nix b/cluster/prod/app/cryptpad/build/deuxfleurs.nix index b566dae..0048590 100644 --- a/cluster/prod/app/cryptpad/build/deuxfleurs.nix +++ b/cluster/prod/app/cryptpad/build/deuxfleurs.nix @@ -5,8 +5,10 @@ pkgs = import sources.nixpkgs {}; in rec { cryptpad = pkgs.callPackage ./default.nix {}; - docker = pkgs.callPackage ./docker.nix { + docker = import ./docker.nix { + inherit pkgs; inherit name tag; inherit cryptpad; + withOnlyOffice = true; }; } diff --git a/cluster/prod/app/cryptpad/build/npins/sources.json b/cluster/prod/app/cryptpad/build/npins/sources.json index 3e8d5df..b750283 100644 --- a/cluster/prod/app/cryptpad/build/npins/sources.json +++ b/cluster/prod/app/cryptpad/build/npins/sources.json @@ -2,9 +2,9 @@ "pins": { "nixpkgs": { "type": "Channel", - "name": "nixos-23.11", - "url": "https://releases.nixos.org/nixos/23.11/nixos-23.11.7237.46397778ef1f/nixexprs.tar.xz", - "hash": "00cy8q07diavxb91g7pxl0gqc68s3hzimsggjc9rqyf99h1q9d3r" + "name": "nixos-24.05", + "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.2355.d032c1a6dfad/nixexprs.tar.xz", + "hash": "1fynyfjsmrxs383mygzlbkb3yhzmlnnpf8x84mikaiqc3ngszsv8" } }, "version": 3 diff --git a/cluster/prod/app/cryptpad/config/config.js b/cluster/prod/app/cryptpad/config/config.js index c693125..eee8981 100644 --- a/cluster/prod/app/cryptpad/config/config.js +++ b/cluster/prod/app/cryptpad/config/config.js @@ -189,6 +189,12 @@ module.exports = { * ===================== */ /* + * We need this config entry, else CryptPad will try to mkdir + * some stuff into Nix store apparently... + */ + base: '/mnt/data', + + /* * CryptPad stores each document in an individual file on your hard drive. * Specify a directory where files should be stored. * It will be created automatically if it does not already exist. diff --git a/cluster/prod/app/cryptpad/deploy/cryptpad.hcl b/cluster/prod/app/cryptpad/deploy/cryptpad.hcl index cc74a5a..b14a093 100644 --- a/cluster/prod/app/cryptpad/deploy/cryptpad.hcl +++ b/cluster/prod/app/cryptpad/deploy/cryptpad.hcl @@ -26,7 +26,7 @@ job "cryptpad" { } config { - image = "kokakiwi/cryptpad:2024.3.1" + image = "kokakiwi/cryptpad:2024.6.0" ports = [ "http" ] volumes = [ |