NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.29k stars 14.27k forks source link

Cannot add lines manually to `/etc/lvm/lvm.conf` #340752

Open doronbehar opened 2 months ago

doronbehar commented 2 months ago

So I have a particular issue in my system that the Arch Linux forums state that it can be fixed by adding to /etc/lvm/lvm.conf:

lvmetad = 0

I cannot do that elegantly today with the way lvm.nix is built. Ccing people who edited that file in the past:

@ajs124 @lilyinstarlight

EDIT NOTE: The ArchLinux issue described in the link above didn't exactly got fix by adding that line to lvm.conf - it cause my reboot to never happen. I'll reside to never rebooting in the meantime (only poweroff) :(.

SigmaSquadron commented 2 months ago

For reference, one could alter that file by using lib.mkForce to override the environment.etc."lvm/lvm.conf".text option. Adding an extraConfig option to the module is far more elegant though. (bonus points if it's a proper settings generator as defined by RFC 0042)