{ config, lib, pkgs, ... }: # Python tools for the primary user's shell environment. let cfg = config.modules.shell.python; # NOLINT(let_order) user = config.user.name; in { options.modules.shell.python.enable = lib.mkEnableOption "Python tools for the primary user's shell environment"; config = lib.mkIf cfg.enable { registry.env-var.${config.networking.hostName}.PYTHON_TOOLCHAIN_ROOT = "${pkgs.python3}"; home-manager.users.${user}.home.packages = [ pkgs.python3 ]; }; }