【发布时间】:2019-02-10 09:55:28
【问题描述】:
我想在一个单独的 .nix 文件中从 configuration.nix 中获得我的已安装软件包列表。我按照手册提出了这个:
{ config, pkgs }:
{
environment.systemPackages = [
pkgs.firefox
];
}
试图编译它给我一个错误:
[root@nixos:/dev/disk]# nixos-rebuild build
building Nix...
error: anonymous function at /etc/nixos/packages.nix:1:1 called with unexpected argument 'options', at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:170:8
(use '--show-trace' to show detailed location information)
building the system configuration...
error: anonymous function at /etc/nixos/packages.nix:1:1 called with unexpected argument 'options', at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:170:8
(use '--show-trace' to show detailed location information)
【问题讨论】: