Add a simple devshell

This commit is contained in:
Malte Tammena 2021-12-21 15:44:22 +01:00
parent e91cf29f2d
commit 5bcfdc9211

View file

@ -308,5 +308,25 @@
]; ];
}; };
devShell.x86_64-linux =
let pkgs = import nixpkgs { system = "x86_64-linux"; };
in pkgs.mkShell {
packages = [
(with pkgs;
writeScriptBin "rebuild" ''
#!${stdenv.shell}
if [ -z $1 ]; then
echo "Need 'switch|boot|...'"
exit 1
fi
branch=$(${git}/bin/git branch --show-current)
sudo ${nixos-rebuild}/bin/nixos-rebuild $1 --flake . --profile-name $branch
'')
inputs.colmena.packages.x86_64-linux.colmena
];
};
}; };
} }