main
 1{lib, ...}: {
 2  den.aspects.core.editor = {
 3    settings = {
 4      name = lib.mkOption {
 5        type = lib.types.str;
 6        default = "hx";
 7      };
 8      package = lib.mkOption {
 9        type = lib.types.functionTo lib.types.package;
10        default = pkgs: pkgs.helix;
11        example = lib.literalExpression "pkgs: pkgs.vim";
12      };
13    };
14
15    nixos = {
16      host,
17      pkgs,
18      ...
19    }: {
20      environment.variables.EDITOR = host.settings.core.editor.name;
21      environment.systemPackages = [
22        (host.settings.core.editor.package pkgs)
23      ];
24    };
25  };
26}