nixos/logind: migrate to settings option#435407
Conversation
|
oh... i thought we had a dang 😞 |
|
@aanderse maybe i should provide the |
b4e3726 to
68eee75
Compare
|
wow! what a generous offer @Stunkymonkey! i bet @LordGrimmauld appreciates the effort... i certainly do. thanks! 🚀 |
e38fdcc to
c32d4d9
Compare
|
@aanderse i am not an expert in deprecating options. But this is my first draft. So please help me out, what should be improved. |
c32d4d9 to
c35ec3a
Compare
|
Oh hey, more rfc 42 in systemd things, love to see it! I'll take a closer look tomorrow, but the over all approach looks reasonable enough. Care needs to be taken to ensure things like nixos VM tests still evaluate, though the rename redirects already do help a lot in that regard. I'll take a closer look once i have the time. |
|
|
side note, not relevant for this PR: seems i joined the systemd team, but am not listed in the systemd-related code owners listings. I'll have to open a PR to add myself to those too, then i'd have gotten a ping at the very beginning. |
There was a problem hiding this comment.
This should probably be done the way systemd.settings.Manager was done:
nixpkgs/nixos/modules/system/boot/systemd.nix
Lines 409 to 419 in 874be15
For one thing, systemd conf files are not exactly the same as INI, as close as they might be. So the utils.systemdUtils.unitOptions.unitOption type, and the utils.systemdUtils.lib.attrsToSection function are the correct ones to use.
And we decided with settings.Manager that it was probably better to just explicitly have settings.Manager as the option, rather than having settings as an attrsOf of sections, because that config file allows only the one section. It's just a little more specific, leaves less room for people to mistakenly use the wrong section name, and still allows us to switch to attrsOf for more sections in the future if systemd ever adds more sections to that conf file. I suggest we do the same here for logind.
c35ec3a to
c562c50
Compare
|
@ElvishJerricco i adjusted the code. But the type |
|
hey @LordGrimmauld, |
3111154 to
89526e1
Compare
LordGrimmauld
left a comment
There was a problem hiding this comment.
I'd still like to have a proper discussion with the systemd folks about whether we should align KillUserProcesses with upstream systemd defaults, but as a 1:1 migration this PR looks pretty good. That discussion can happen elsewhere. Thank you :)
|
I forgot to say, i did run the |
r-vdp
left a comment
There was a problem hiding this comment.
LGTM, I'll leave it to the systemd team to merge.
| ''; | ||
| type = lib.types.submodule { | ||
| freeformType = lib.types.attrsOf utils.systemdUtils.unitOptions.unitOption; | ||
| options.KillUserProcesses = lib.mkOption { |
There was a problem hiding this comment.
This workaround might not be needed anymore at all, and we should probably drop this entirely (and add/update release notes).
tmux now spawns panes in separate cgroups, see tmux/tmux#3514.
|
Let's deal with not overriding the upstream default in our defaults in a followup. |
|
@flokli i am all for it. I first wanted migrate to the rfc42 style without changing the behavior. |
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
There is a breaking change that landed in the upstream from this PR NixOS/nixpkgs#435407
|
No backwards compatibility, seriously? |
Hm, what do you mean? There is rename modules for the things that were renamed, just |
|
It would be nice to keep |
|
We did not retain That said, yes, there is different things that did not have their dedicated options before. In those cases, retaining |
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
NixOS/nixpkgs#435407 Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
There is a breaking change that landed in the upstream from this PR NixOS/nixpkgs#435407
add
services.logind.settingsThings done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.