summaryrefslogtreecommitdiff
path: root/modules/flake-parts/devenv.nix
blob: bdc40b150a05eb402eb8355fd91c153f54cdcec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
devenvModules: {
  flake-parts-lib,
  lib,
  inputs,
  ...
}: {
  imports = [inputs.devenv.flakeModule];

  options.perSystem = flake-parts-lib.mkPerSystemOption {
    options.devenv.shells = lib.mkOption {
      type = with lib.types;
        lazyAttrsOf (submoduleWith {
          modules = builtins.attrValues devenvModules;
          shorthandOnlyDefinesConfig = null;
        });
    };
  };

  # the extra parameter before the module make this module behave like an
  # anonymous module, so we need to manually identify the file, for better
  # error messages, docs, and deduplication.
  _file = __curPos.file;
}