polish: use inherit

This commit is contained in:
Ryan Yin 2024-03-16 12:56:21 +08:00
parent dfc73a8667
commit 6d986d75c4
2 changed files with 4 additions and 4 deletions

View File

@ -39,13 +39,13 @@ Here's an example of how you can add multiple nixpkgs inputs, each using a diffe
pkgs-stable = import nixpkgs-stable {
# Refer to the `system` parameter from
# the outer scope recursively
system = system;
inherit system;
# To use Chrome, we need to allow the
# installation of non-free softwares.
config.allowUnfree = true;
};
pkgs-fd40cef8d = import nixpkgs-fd40cef8d {
system = system;
inherit system;
config.allowUnfree = true;
};
};

View File

@ -40,14 +40,14 @@
# 这样能有效重用 nixpkgs 实例,避免 nixpkgs 实例泛滥。
pkgs-stable = import nixpkgs-stable {
# 这里递归引用了外部的 system 属性
system = system;
inherit system;
# 为了拉取 chrome 等软件包,
# 这里我们需要允许安装非自由软件
config.allowUnfree = true;
};
pkgs-fd40cef8d = import nixpkgs-fd40cef8d {
system = system;
inherit system;
config.allowUnfree = true;
};
};