flake/devshell: make devshell optional

as this isn't used by consumers, they should be able to remove this
input via `inputs.nixvim.inputs.devshell.follows = ""`
This commit is contained in:
seth 2024-07-07 15:19:35 -04:00
parent 22a6678279
commit 2f21379b8c
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86

View file

@ -1,15 +1,16 @@
{ inputs, ... }:
{ lib, inputs, ... }:
{
imports = [ inputs.devshell.flakeModule ];
imports = lib.optional (inputs.devshell ? flakeModule) inputs.devshell.flakeModule;
perSystem =
{
lib,
pkgs,
config,
system,
...
}:
{
lib.optionalAttrs (inputs.devshell ? flakeModule) {
devshells.default = {
devshell.startup.pre-commit.text = config.pre-commit.installationScript;