Trying to make a searx instance, fail when rebuilding?

[trojanhex@nixos:/etc/nixos]$ sudo nixos-rebuild switch
building Nix…
building the system configuration…
error:
… while calling the ‘head’ builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:1:35741:
… while evaluating the attribute ‘value’
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:33591:
… while evaluating the option `system.build.toplevel’:

   … while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix':

   … while evaluating the option `warnings':

   … while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd.nix':

   … while evaluating the option `systemd.services.nginx.serviceConfig':

   … while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd.nix':

   … while evaluating the option `systemd.services.nginx.preStart':

   … while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/web-servers/nginx/default.nix':

   … while evaluating the option `services.nginx.virtualHosts."search.example.com".sslCertificate':

   (stack trace truncated; use '--show-trace' to show the full, detailed trace)

   error: A definition for option `services.nginx.virtualHosts."search.example.com".sslCertificate' is not of type `path'. Definition values:
   - In `/etc/nixos/configuration.nix': "..."

[trojanhex@nixos:/etc/nixos]$

i do not have flakes fyi

error: A definition for option services.nginx.virtualHosts."search.example.com".sslCertificate' is not of type path’.

Well, what did you set sslCertificate equal to?

1 Like

Ooh that’s the thing, I copy pasted my code from the wiki, it doesn’t really say what I’m supposed to put there

I think you just need to replace the " search.example.com" with the correct domain?
for example:

Blockquote services.nginx.virtualHosts.TheDirectoryToTheRealLocationGoesHere.sslCertificate' is not of type path’.