我在 NixOS 下工作,到目前为止我很喜欢它。
对于我的编码项目,我正在尝试实现单独的开发环境。例如,对于我的 Scala/node.js 项目,我为 nix-shell 编写了 default.nix:
with import <nixpkgs> {}; {
tarifs2Env = stdenv.mkDerivation {
name = "webapp";
buildInputs = with pkgs; [
sbt
nodejs
nodePackages.gulp
];
shellHook = ''
'';
};
}
到目前为止,一切都很好。现在我想添加一个数据库,例如 posgtres。有没有办法向 nix-shell 添加服务?