I’m trying to install and configure the element web package.
I added the package to environment.systemPackages in configuration.nix and in my nginx.nix I added a location:
"/element/" = {
alias = pkgs.element-web.outPath + "/";
index = "index.html";
};
And it’s working fine! Now I’m trying to configure it, but I don’t understand how I’m supposed to do it.
There is the following line in element-web’s package: configOverrides = writeText "element-config-overrides.json" (builtins.toJSON (noPhoningHome // conf));
And at the beginning of the file: { lib, stdenv, fetchurl, writeText, jq, conf ? {} }:
So I guess I need to add my config to the conf set; I tried to insert this in environment.systemPackages but it didn’t work:
(let conf = {
default_server_config = "my.custom.homeserver.com";
}; in
element-web)
(I’m guessing this doesn’t affect the import of the nix, so conf isn’t passed to element-web.nix)
If anyone knows how to do this, or can give me some pointers I’ll be grateful!
Ok so I’m making some progress here:
In my previous post, I was defining and installing a custom element derivation however nginx was still refering to the old (uncustomized) derivation.
So I need to refer to this custom derivation and from what I’ve read mkDerivation seems the way to go : it install a derivation, and should produce an outPath that I can use in my nginx.nix
cannot coerce a set to a string, at /nix/store/3ivi8sgbmddkmwzpaxazxw48rqpr16pm-nixos-21.11pre294109.fbfb79400a0/nixos/pkgs/stdenv/generic/make-derivation.nix:201:11