How do I organize my home bash service the modular way?

I’m trying to follow this guide with the services that I use and bash-home-service-type is one I use.

This is the error I’m getting when I try:

$ guix repl -L ~/dotfiles/
...
scheme@(guix-user)> ,use(config home home-config)
;;; note: source file /home/folaht/dotfiles/config/home/home-config.scm
;;;       newer than compiled /home/folaht/.cache/guile/ccache/3.0-LE-8-4.7/home/folaht/dotfiles/config/home/home-config.scm.go
While executing meta-command:
Wrong type to apply: #<service-type home-bash 7f8458337440>

~/dotfiles/config/home/home-config.scm

(define-module (config home home-config)
  #:use-module (gnu)
  #:use-module (gnu home)
  #:use-module (gnu packages emacs)
  #:use-module (gnu packages version-control)
  #:use-module (config home services shells))

(home-environment
  (packages (list git))
  (services
   (list (service my-home-bash-service-type))))

~/dotfiles/config/home/services/shells.scm

(define-module (config home services shells)
  #:use-module (gnu home)
  #:use-module (gnu home services)
  #:use-module (gnu home services shells)
  #:export (my-home-bash-service-type))

(define my-home-bash-service-type 
  (home-bash-service-type
    (home-bash-configuration
      (guix-defaults? #f))))

[edit]

I’ve tried an alternative:

scheme@(guix-user)> ,use(config home home-config)
Wrong type to apply: #<<service> type: #<service-type home-bash 7f14d5bb44c0> 
value: #<<home-bash-configuration> 
package: #<package bash@5.2.37 gnu/packages/bash.scm:162 7f14d583c160> 
guix-defaults?: #f environment-variables: () variables: () 
aliases: (("ls" . "ls -p --color=auto") ("ll" . "ls -l") ("grep" . "grep --color=auto") ("ip" . "ip -color=auto")) 
bash-profile: () bashrc: () bash-logout: () %location: #<<location> 
file: "/home/folaht/dotfiles/config/home/services/shells.scm" line: 10 column: 10>>>

~/dotfiles/config/home/home-config.scm

...
(home-environment
  (packages (list git))
  (services
   (append (list (my-home-bash-service)) %base-home-services)))

~/dotfiles/config/home/services/shells.scm

...
(define my-home-bash-service
  (service home-bash-service-type 
	(home-bash-configuration 
      (guix-defaults? #f))))

I think it would work if you just use

(home-environment
  (services
   (list my-home-bash-service-type)))

I think service is used only to call service definitions that you’ve created or are in Guix already, whereas here you’re just calling your own variable that contains home-bash-service-type configuration. Feel free for anyone to correct me if i got something wrong here cause i’m not too knowledgeable on the inner workings.

It works like this:

(home-environment
 (packages (specifications->packages (list "...package-name...")))
 (services
  (append (list (service home-bash-service-type
                         (home-bash-configuration
                          (aliases
                           '(("grep" . "grep --color=auto")
                             ("ip" . "ip -color=auto")
                             ("ls" . "ls -p --color=auto")
                             ("ll" . "ls -l")
                             ("la" . "ls -la")))
                          ;; Bash configuration
                          (bashrc (list (local-file "dot-bashrc.sh" "bashrc")))
                          (bash-profile (list (local-file "dot-bash_profile.sh" "bash_profile"))))))
                %base-home-services)))

That’s the non-modular way.
How do I write it modular, where home-bash-service-type is a variable in a module?