nixos-config/shell.nix
Dmitriy Kholkin c3f757ac1a many changes
2020-08-05 04:52:30 +04:00

19 lines
339 B
Nix

{ pkgs ? import <nixpkgs> { } }:
let
rebuild = pkgs.writeShellScriptBin "rebuild" ''
if [[ -z $1 ]]; then
echo "Usage: $(basename $0) {switch|boot|test}"
else
sudo nixos-rebuild $1 --flake .
fi
'';
in
pkgs.mkShell {
name = "nixflk";
nativeBuildInputs = with pkgs; [
git
git-crypt
rebuild
];
}