[Nix-dev] Re: optionally copying configuration.nix into system derivation

Ludovic Courtès ludo at gnu.org
Wed Apr 28 11:06:42 CEST 2010


Hi Marc,

Marc Weber <marco-oweber at gmx.de> writes:

> About context: I still expect every Nix(OS) user being capable of using
> grep like tools to see where an option is used. idutils is perfect and
> fast for this kind of query.

I think the barrier to entry should be as low as possible.  Having a
single place to configure the whole system is a great opportunity to
make things simpler.

>   commit ac78f8935877f7a2aed194bf9398b54faa4952a1
>   Author: Marc Weber <marco-oweber at gmx.de>
>   Date:   Tue Apr 27 03:40:54 2010 +0200
>
>       adding two new options:
>       - system.copySystemConfiguration (requested by Ludovic Courtès)
>       - system.extraSystemBuilderCmds

OK, I like this version, thanks for taking the time!

>   diff --git a/lib/from-env.nix b/lib/from-env.nix
>   index a7a339b..6bd71e4 100644
>   --- a/lib/from-env.nix
>   +++ b/lib/from-env.nix
>   @@ -1,3 +1,4 @@
>   +# TODO: remove this file. There is lib.maybeEnv now
>    name: default:
>    let value = builtins.getEnv name; in
>    if value == "" then default else value
>   diff --git a/modules/services/x11/xserver.nix b/modules/services/x11/xserver.nix
>   index e408000..68bfed8 100644
>   --- a/modules/services/x11/xserver.nix
>   +++ b/modules/services/x11/xserver.nix
>   @@ -155,7 +155,7 @@ in
>    
>          modules = mkOption {
>            default = [];
>   -        example = [ pkgs.linuxwacom ];
>   +        example = [ pkgs.xorg.xf86inputsynaptics ];
>            description = "Packages to be added to the module search path of the X server.";
>          };

As Yury said, there are unrelated changed that ought to be in another commit.

>   +      description = ''
>   +        Unless set to false copies the nixos configuration file
>   +        $NIXOS_CONFIG defaulting to /etc/nixos/configuration.nix

<literal>$NIXOS_CONFIG</literal> and <filename>/etc/...</filename>.

>   +        See extraSystemBuilderCmds if you want to do add more customized info

<literal>extraSystemBuilderCmds</literal> (can we use an xref here?).

Thanks,
Ludo’.




More information about the nix-dev mailing list