os/shell.nix

18 lines
414 B
Nix
Raw Normal View History

2020-01-02 04:01:58 +00:00
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
nixFlakes
];
NIX_CONF_DIR = let
current = pkgs.lib.optionalString (builtins.pathExists /etc/nix/nix.conf)
(builtins.readFile /etc/nix/nix.conf);
nixConf = pkgs.writeTextDir "opt/nix.conf" ''
${current}
experimental-features = nix-command flakes ca-references
'';
in
"${nixConf}/opt";
}