Add a simple devshell
This commit is contained in:
parent
e91cf29f2d
commit
5bcfdc9211
20
flake.nix
20
flake.nix
|
@ -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
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue