mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-12-26 00:28:52 +01:00
feat: nix module's specialArgs
This commit is contained in:
parent
7918e3d88e
commit
1d18061a1a
@ -200,7 +200,7 @@ First, we need to add Helix as an input in `flake.nix`:
|
||||
system = "x86_64-linux";
|
||||
|
||||
# Set all input parameters as specialArgs of all sub-modules
|
||||
# so that we can use the `helix` input in sub-modules
|
||||
# so that we can use the `helix`(an attribute in inputs) in sub-modules directly.
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
|
@ -182,7 +182,7 @@ cat flake.nix
|
||||
system = "x86_64-linux";
|
||||
|
||||
# 将所有 inputs 参数设为所有子模块的特殊参数,
|
||||
# 这样就能在子模块中使用 helix 这个 inputs 了
|
||||
# 这样就能直接在子模块中使用 inputs 中的 helix 了
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
|
Loading…
Reference in New Issue
Block a user