Skip to content

Commit 6d986d7

Browse files
committed
polish: use inherit
1 parent dfc73a8 commit 6d986d7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/nixos-with-flakes/downgrade-or-upgrade-packages.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ Here's an example of how you can add multiple nixpkgs inputs, each using a diffe
3939
pkgs-stable = import nixpkgs-stable {
4040
# Refer to the `system` parameter from
4141
# the outer scope recursively
42-
system = system;
42+
inherit system;
4343
# To use Chrome, we need to allow the
4444
# installation of non-free softwares.
4545
config.allowUnfree = true;
4646
};
4747
pkgs-fd40cef8d = import nixpkgs-fd40cef8d {
48-
system = system;
48+
inherit system;
4949
config.allowUnfree = true;
5050
};
5151
};

docs/zh/nixos-with-flakes/downgrade-or-upgrade-packages.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
# 这样能有效重用 nixpkgs 实例,避免 nixpkgs 实例泛滥。
4141
pkgs-stable = import nixpkgs-stable {
4242
# 这里递归引用了外部的 system 属性
43-
system = system;
43+
inherit system;
4444
# 为了拉取 chrome 等软件包,
4545
# 这里我们需要允许安装非自由软件
4646
config.allowUnfree = true;
4747
};
4848
4949
pkgs-fd40cef8d = import nixpkgs-fd40cef8d {
50-
system = system;
50+
inherit system;
5151
config.allowUnfree = true;
5252
};
5353
};

0 commit comments

Comments
 (0)