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

Rickard Nilsson rickard.nilsson at telia.com
Wed Sep 7 00:35:26 CEST 2016


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


More information about the nix-dev mailing list