aboutsummaryrefslogtreecommitdiffstats
path: root/modules/tools/devenv/default.nix
blob: 43be2df74fb8fb51b195efa65eec5e9f7d0f59b0 (plain)
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
{
  config,
  pkgs,
  lib,
  ...
}:

# Devenv - Developer environment tooling (Nix-based dev environments)
{
  options.tools.devenv = {
    enable = lib.mkEnableOption "Enables devenv.";
  };

  config =
    let
      shellIntegration = builtins.readFile ./alias.sh;
    in
    lib.mkIf config.tools.devenv.enable {
      home.packages = with pkgs; [
        devenv
      ];

      programs.zsh.initContent = lib.mkIf config.programs.zsh.enable (lib.mkAfter shellIntegration);
      programs.bash.initExtra = lib.mkIf config.programs.bash.enable (lib.mkAfter shellIntegration);
    };
}