Skip to content

nixos/crowdsec: fatal error when using cscli explain #445337

Open

Description

@nicomem

Nixpkgs version

  • Unstable (25.11)

Describe the bug

The crowdsec module generates the cscli script, referencing the generated config.yaml file, so that the user does not need to reference it manually.

However, when using the cscli explain command, I get the following fatal error: while loading configuration file: while reading yaml file: open /etc/crowdsec/config.yaml: no such file or directory.

It seems that cscli explain tries to load the configuration using the default location instead of the generated one.

If I manually create a /etc/crowdsec/config.yaml symlink pointing to the generated configuration file, the cscli explain command works correctly.
-> However, since the location of the generated config file is not accessible (easily) from outside the module, this must be done manually and will break if the config file changes (and thus changes location)

Steps to reproduce

  • Enable the crowdsec module
  • Call cscli explain (e.g. cscli explain --file /var/log/caddy/foo.log --type caddy)

Expected behaviour

The cscli explain command works correctly

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.44, NixOS, 25.11 (Xantusia), 25.11.20250918.0147c2f
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.28.5
  • nixpkgs: /nix/store/wn3wblni1cm7plb1dvakqcmr31szqdgn-source

Notify maintainers

@M0ustach3
@TornaxO7
@06kellyjac


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: bug
    6.topic: nixos
    on Sep 22, 2025
  2. TornaxO7 commented on Sep 26, 2025

    @TornaxO7
    Contributor

    Hm... yeah, I see your point here. I think this can be combined in a PR with #445342.

  3. added
    2.status: stale
    on Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug2.status: stale6.topic: nixos

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions