nixpkgs/home/packages/custom/push-etckeeper/default.nix
Daniel Siepmann 21573b25f5
Ease writeShellApplication calls
Provide proper runtimeInputs instead of using nix variables all the
time.
2022-05-31 18:54:47 +02:00

23 lines
311 B
Nix

{
writeShellApplication,
git
}:
writeShellApplication {
name = "custom-push-etckeeper";
runtimeInputs = [
git
];
text = ''
mkdir /tmp/etckeeper
cd /tmp/etckeeper
sudo cp -r /etc/.git .
sudo chown -R daniels:daniels .
git push
cd /tmp
rm -rf /tmp/etckeeper
'';
}