feat: 适配 git submodule 方式引用

This commit is contained in:
KAAAsS 2023-06-15 23:43:58 +08:00
parent a4663a3c2e
commit aba12699a6
Signed by: KAAAsS
GPG Key ID: D22F53AF662411FE
2 changed files with 23 additions and 22 deletions

View File

@ -1,22 +0,0 @@
# active_config.nu -- 当前活动的 dotfiles 配置
#
# dotfiles 可用的配置为一个 Nushell 模块,通过文件夹形式组织:`<模块名>/mod.nu`。
# 模块需要声明 `register` 函数以通过 dotfiles 模块进行当前模块的信息注册。如:
#
# > use ../knotfiles/dotfile *
# >
# > def-env register [] {
# > declare "example" "example/example.yml" ".config/example.yml"
# > }
#
# 若要启用一个配置,则需要在此文件中导入该模块,并在 `register` 函数中调用对应模块的
# `register` 函数。
#
# Copyright (C) 2022-2023 KAAAsS
use example_module
# 注册全部模块
export def-env register [] {
example_module register
}

1
active_config.nu Symbolic link
View File

@ -0,0 +1 @@
../active_config.nu

22
active_config.nu.example Normal file
View File

@ -0,0 +1,22 @@
# active_config.nu -- 当前活动的 dotfiles 配置
#
# dotfiles 可用的配置为一个 Nushell 模块,通过文件夹形式组织:`<模块名>/mod.nu`。
# 模块需要声明 `register` 函数以通过 dotfiles 模块进行当前模块的信息注册。如:
#
# > use ../knotfiles/dotfile *
# >
# > def-env register [] {
# > declare "example" "example/example.yml" ".config/example.yml"
# > }
#
# 若要启用一个配置,则需要在此文件中导入该模块,并在 `register` 函数中调用对应模块的
# `register` 函数。
#
# Copyright (C) 2022-2023 KAAAsS
use example_module
# 注册全部模块
export def-env register [] {
example_module register
}