pub-solar-os/shell.nix
2020-07-30 22:17:28 -06:00

22 lines
547 B
Nix

{ pkgs ? import <nixpkgs> { } }:
let
configs = "${toString ./.}#nixosConfigurations";
buildIso = pkgs.writeShellScriptBin "build-iso" ''
nix build ${configs}.niximg.config.system.build.isoImage $@
'';
in
pkgs.mkShell {
name = "nixflk";
nativeBuildInputs = with pkgs; [ git git-crypt nixFlakes buildIso ];
shellHook = ''
mkdir -p secrets
PATH=${
pkgs.writeShellScriptBin "nix" ''
${pkgs.nixFlakes}/bin/nix --option experimental-features "nix-command flakes ca-references" $@
''
}/bin:$PATH
'';
}