···29 each = host.users;
30 fromClass = _user: "user";
31 intoClass = _user: class; # the class being resolved: nixos or darwin.
32+ intoPath = user: [ "users" "users" user.userName ];
33 fromAspect = user: den.aspects.${user.aspect};
34 adaptArgs = os-args: { osConfig = os-args.config; };
35 };
···114 intoClass = _: class;
115 intoPath = _: [ "environment" "persistance" "/nix/persist/system" ];
116 fromAspect = _: lib.head aspect-chain;
117+ guard = { options, ... }@osArgs: options ? environment.persistance;
118};
119120den.hosts.my-laptop.includes = [ persys ];
121122# becomes nixos.environment.persistance."/nix/persist/system".hideMounts = true;
123+den.aspects.my-laptop.persys.hideMounts = true;
124```
125126+One cool thing about these custom classes is that aspects can simply define
127+settings at them, without having to worry if the options they depend or
128+some feature is enabled. The guard itself is reponsible for that check
129+in only one place, instead of having `mkIf` in a lot of places.
130131## Creating Your Own
132