Open sumnerevans opened 2 years ago
Hmm, I tried fixing it but I'm not really able to, probably due to a lack of knowledge in NixOS modules. The mjolnir-module was more or less my fist "real" NixOS module.
In the mjolnir module when merging the { homeserver = cfg.homeserverUrl; }
and cfg.pantalaimon.options
there were brackets missing:
nix-repl> lib.mkIf true { homeserver = "https://matrix.org"; } // { listenPort = 8100; }
{ _type = "if"; condition = true; content = { ... }; listenPort = 8100; }
vs
nix-repl> lib.mkIf true ({ homeserver = "https://matrix.org"; } // { listenPort = 8100; })
{ _type = "if"; condition = true; content = { ... }; }
but when using the fixed version I get the following error (e.g. when trying to run the mjolnir test):
error: The option `services.mjolnir.pantalaimon.options.homeserver' is used but not defined.
(use '--show-trace' to show detailed location information)
When setting a default value for the homeserver
option the error goes away but the homeserver
value then cannot be changed from the default value defined in pantalaimon-options.nix
... but the listenPort
, listenAddress
and other options can be changed and appear in the generated config ...
Describe the bug
The
services.mjolnir.pantalaimon.options
option has no effect.For example, given the following config:
running
nixos-rebuild switch
and then inspecting withnixos-option services.pantalaimon-headless.instances
gives:Note that the port is wrong.
If I manually add
services.pantalaimon-headless.instances.mjolnir.listenPort = 8100;
then I can achieve the desired affect, but that is not a great situation.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
the setting should work
Notify maintainers
@jojosch
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information: