[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17460 - viric - in nixos/trunk/modules: . config installer installer/generations-dir installer/grub system/activation

Eelco Dolstra e.dolstra at tudelft.nl
Mon Sep 28 10:32:56 CEST 2009


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).

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?)

> --- 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.

> --- 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.

> -      grubDevice = mkOption {

I'd rename this to "device" or something since grub.grubDevice is redundant.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list