Aliases not working for fish shell + sudo

This seems to be a fish shell issue.
The bash trick doesn’t work, so one has to write a fish alias function, remove the sudo alias for the home-fish-service-type and since there’s no functions option for home-fish-configuration, I put the alias function in the config.fish file, which loads at startup.

~/dotfiles/home/folaht/main-computer.scm

(define-module (config home folaht main-computer)
  #:use-module (gnu home)
  ...
  #:use-module (gnu packages shells)
  #:use-module (config home .services shells)
  ...)

(home-environment
  ...
  (services
   (append (list home-fish-service-default
                 ...)
           %base-home-services)))

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

(define shell-aliases
  '(("df" . "df -h") 
    ...
    (".." . "cd ../")))

(define bash-aliases (append '(("sudo" . "sudo ")) shell-aliases))

(define home-bash-service-default
  (service home-bash-service-type
    (home-bash-configuration
      ...
      (aliases bash-aliases)
      ...)))

(define home-fish-service-default
  (service home-fish-service-type
           (home-fish-configuration 
             (config (list (local-file "../.config/fish/functions/sudo.fish")))
             (aliases shell-aliases)))))

~dotfiles/home/.config/fish/functions/sudo.fish

function sudo
    if functions -q -- "$argv[1]"
        set cmdline (
            for arg in $argv
                printf "\"%s\" " $arg
            end
        )
        set -x function_src (string join "\n" (string escape --style=var (functions "$argv[1]")))
        set argv fish -c 'string unescape --style=var (string split "\n" $function_src) | source; '$cmdline
        command sudo -E $argv
    else
        command sudo $argv
    end
end