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

  options.perSystem = flake-parts-lib.mkPerSystemOption ({lib, ...}: {
    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;
}