我目前的列表定义为:
environment.systemPackages = with pkgs; [
acpi
ag
alacritty
audacity
awscli
bash
breeze-gtk
cabal-install
];
我将如何定义两个列表,然后合并它们以设置
environment.systemPackages
值?
我想拆分列表,以便更轻松地管理相关包组。
++
列表串联运算符:
nix-repl> [1 2 3] ++ [5 6]
[ 1 2 3 5 6 ]
代码示例:
let
unstable = import <unstable> {
config = config.nixpkgs.config;
};
examplePkgs = with pkgs; [
bash
];
in
{
environment.systemPackages = with pkgs; [
google-chrome
]
++ examplePkgs;