[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17460 - viric - in nixos/trunk/modules: . config installer installer/generations-dir installer/grub system/activation
Lluís Batlle
viriketo at gmail.com
Mon Sep 28 10:58:22 CEST 2009
Hello,
2009/9/28, Eelco Dolstra <e.dolstra at tudelft.nl>:
> Hi,
>
> Llus Batlle wrote:
>
> > Log:
> > Making modular my previous changes for armv5tel. I updated the way to use
> > grub. Its options are no more inside 'boot', but inside 'boot.loader.grub'.
>
> Renaming the Grub-related options to boot.loader.grub is not necessarily a bad
> idea, but it does break just about every NixOS configuration file :-) It also
> requires the manual and examples to be updated (in particular because of
> boot.grubDevice).
I knew about the break... but, could I have done it easier? I felt I
would not annoy much more than some other changes I noticed in nixos
(like the last change in the policy kit or whatever, linked to
nixpkgs, or the not usage of ~/.nixpkgs/config.nix I noticed only
today).
I hope not many people blame the change.
>
> It would be nice if we had some mechanism to declare option renamings, e.g. that
> every value for "boot.grubDevice" in a configuration file is renamed to
> "boot.loader.grub.device". (Nicolas?)
Automagically? Would it be worth the effort? I imagine it quite
complex, for this not to fail often, but maybe a quick solution (which
I don't image) would work.
>
> > --- nixos/trunk/modules/installer/generations-dir/generations-dir-builder.sh (rev 0)
> > +++ nixos/trunk/modules/installer/generations-dir/generations-dir-builder.sh 2009-09-27 21:51:37 UTC (rev 17460)
>
> Since this file has a lot in common with the Grub menu builder, it might be a
> good idea to factor out the commonality.
I agree. I left the 'factoring' for the future, once it works.
>
> > --- nixos/trunk/modules/installer/generations-dir/generations-dir.nix (rev 0)
> > +++ nixos/trunk/modules/installer/generations-dir/generations-dir.nix 2009-09-27 21:51:37 UTC (rev 17460)
> ...
> > + options = {
> > + boot = {
> > + loader = {
> > + generationsDir = {
>
> It's better nowadays to write boot.loader.generationsDir = { ... } because it
> gives fewer indentation levels.
Ok.
>
> > - grubDevice = mkOption {
>
> I'd rename this to "device" or something since grub.grubDevice is redundant.
I didn't think of it, and I agree, of course.
More information about the nix-dev
mailing list