Open arianvp opened 5 years ago
@arianvp is this still applicable?
I'd personally be more in favour of option 2, and moving journal-gateway-specific stuff into a separate .nix file, similar to how it was handled with https://github.com/NixOS/nixpkgs/pull/87742.
It still is! Assign it to me. I'll make a PR
I marked this as stale due to inactivity. → More info
@arianvp poke ;-)
For anyone else stumbling on this, the option is called services.journald.enableHttpGateway = true
now.
@tv42 But the bug still applies, right?
@flokli I can't comment on that. After reading about the gateway, I realized it's not what I was looking for.
I marked this as stale due to inactivity. → More info
Issue description
We load an invalid unit when
enableHttpGateway = false
The cause:
We do not include the upstream unit when it is disabled (https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/systemd.nix#L162)
This line creates an empty unit when
enableHttpGateway
is false. This should be fine if the upstream unit exist, as we will generate an empty override unit, but because the upstream unit doesn't exist whenenableHttpGateway = false
we create a new empty unit which has invalid contents, instead of overriding an existing unit with no new informationPotential Fix
Two options:
Always include the upstream unit, but only have the optional
wantedBy = "sockets.target
<-- I prefer this oneBubble up the conditional, such that we do not create an empty
systemd-journal-gatewayd
unit:Steps to reproduce
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the results.