[Nix-dev] nix modules: Unsetting attrsOf options?

Guillaume Maudoux (Layus) layus.on at gmail.com
Wed Sep 7 12:25:24 CEST 2016


I remember having som luck with

config = {
  myattrs.a = mkForce null;
}

Depending on how the module handles null values, it could work.

-- Layus.

Le 07/09/16 à 00:35, Rickard Nilsson a écrit :
> Is it possible to unset an attrsOf option? Say I import a module that
> looks like this:
>
> options = {
>   myattrs = mkOption {
>     type = types.attrsOf ...
>     default = {};
>   };
> }
>
> config = {
>   myattrs = {
>     a = ...
>     b = ...
>   };
> };
>
> And then I want to remove the "a" attribute in the importing config:
>
> config = {
>   myattrs.a = mkForce ...
> }
>
> Is that possible in any way?
>
>
>   / Rickard
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list