diff --git a/home/admin-jroeger.nix b/home/admin-jroeger.nix index 2da398f..f759965 100644 --- a/home/admin-jroeger.nix +++ b/home/admin-jroeger.nix @@ -17,6 +17,7 @@ hive.doom.withNixPkgs = true; hive.doom.withShellPkgs = true; hive.doom.withCXXPkgs = true; + hive.doom.withPythonPkgs = true; # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release diff --git a/modules/home/doom/doom.nix b/modules/home/doom/doom.nix index fd4c1a1..615e9bc 100644 --- a/modules/home/doom/doom.nix +++ b/modules/home/doom/doom.nix @@ -49,6 +49,11 @@ gdb ninja ]; + default-python-pkgs = with pkgs; [ + python + pythonPackages.black + pyright + ]; doom-path-pkgs = lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs) ++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs) @@ -96,17 +101,14 @@ in { options.hive.doom = { enable = lib.mkEnableOption "Enable Doom Emacs"; - asDefaultEditor = lib.mkOption { - type = lib.types.bool; - default = false; - description = "set the EDITOR variable to use the current emacs server (graphical/non-graphical)"; - }; + asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)"; enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs"; enableTidal = lib.mkEnableOption "Enable TidalCycles"; withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path"; withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; withCXXPkgs = lib.mkEnableOption "Enable CXX packages in doom path"; + withPythonPkgs = lib.mkEnableOption "Enable python packages in doom path"; overrideLatexPkgs = lib.mkOption { type = lib.types.functionTo (lib.types.listOf lib.types.package); default = pkgs: pkgs; @@ -147,6 +149,16 @@ in { ''; description = "Override the default C++ packages in the doom path."; }; + overridePythonPkgs = lib.mkOption { + type = lib.types.functionTo (lib.types.listOf lib.types.package); + default = pkgs: pkgs; + example = '' + prev: with pkgs; [ + pythonPackages.black + ] + ''; + description = "Override the default Python packages in the doom path."; + }; }; config = lib.mkIf cfg.enable {