Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/grafana-agent: fix shellcheck #391910

Closed
3 tasks done
sedlund opened this issue Mar 21, 2025 · 1 comment
Closed
3 tasks done

nixos/grafana-agent: fix shellcheck #391910

sedlund opened this issue Mar 21, 2025 · 1 comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@sedlund
Copy link
Member

sedlund commented Mar 21, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

with systemd.enableStrictShellChecks = true; I get

unit-script-grafana-agent-start> export HOSTNAME=$(< /proc/sys/kernel/hostname)
unit-script-grafana-agent-start>        ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

easy enough fix, but the comment above I'm not sure is true (any longer?):

        # We can't use Environment=HOSTNAME=%H, as it doesn't include the domain part.

systemd.unit(5) states that %H is the host name and %l is the short name (truncated to first dot to remove any domain component`)

So I'm opening the issue to solicit feedback on which way this should go and any glean any further context available.

Steps to reproduce

enable systemd.enableStrictShellChecks

Expected behaviour

enableStrictShellChecks should work

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

this path will be fetched (0.02 MiB download, 0.06 MiB unpacked):
/nix/store/md93ycspqdq3arrv9ms0m4c33jssizgg-stdenv-linux
copying path '/nix/store/md93ycspqdq3arrv9ms0m4c33jssizgg-stdenv-linux' from 'https://cache.nixos.org'...

  • system: "x86_64-linux"
  • host os: Linux 5.15.167.4-microsoft-standard-WSL2, NixOS, 25.05 (Warbler), 25.05.20250319.a84ebe2
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.12
  • nixpkgs: /nix/store/1728d3jg85mkz2w2cvk6vi74i30fn6x7-source

Notify maintainers

@flokli
@zimbatm


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.

@sedlund sedlund added 0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Mar 21, 2025
@sedlund
Copy link
Member Author

sedlund commented Mar 22, 2025

closing this, as I see grafana-agent is going to be end-of-life 2025-11-01 for grafana-alloy

@sedlund sedlund closed this as completed Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull requests

1 participant