forked from numtide/devshell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake-module.nix
29 lines (25 loc) · 849 Bytes
/
flake-module.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, flake-parts-lib, ... }:
let
inherit (flake-parts-lib) mkPerSystemOption;
inherit (lib) mkOption types;
in
{
options = {
perSystem = mkPerSystemOption ({ config, pkgs, ... }: {
options.devshells = mkOption {
description = ''
Configure devshells with flake-parts.
Not to be confused with `devShells`, with a capital S. Yes, this
is unfortunate.
Each devshell will also configure an equivalent `devShells`.
Used to define devshells. not to be confused with `devShells`
'';
type = types.lazyAttrsOf (types.submoduleWith {
modules = import ./modules/modules.nix { inherit pkgs lib; };
});
default = { };
};
config.devShells = lib.mapAttrs (_name: devshell: devshell.devshell.shell) config.devshells;
});
};
}