Ease writeShellApplication calls
Provide proper runtimeInputs instead of using nix variables all the time.
This commit is contained in:
parent
cd63d01702
commit
21573b25f5
|
@ -8,8 +8,14 @@
|
|||
writeShellApplication {
|
||||
name = "custom-backup";
|
||||
|
||||
runtimeInputs = [
|
||||
borgbackup
|
||||
rsync
|
||||
git
|
||||
];
|
||||
|
||||
text = ''
|
||||
${borgbackup}/bin/borg create \
|
||||
borg create \
|
||||
-v \
|
||||
--progress \
|
||||
--stats \
|
||||
|
@ -17,11 +23,11 @@ writeShellApplication {
|
|||
/media/daniels/Backup/borg::"$(date +%F-%R)" \
|
||||
~/
|
||||
|
||||
${rsync}/bin/rsync -az ~/.config/nixpkgs /media/daniels/Backup/
|
||||
rsync -az ~/.config/nixpkgs /media/daniels/Backup/
|
||||
|
||||
sudo ${rsync}/bin/rsync -az /etc/.git /media/daniels/Backup/etc/
|
||||
sudo chown daniels:daniels -R /media/daniels/Backup/etc/
|
||||
cd /media/daniels/Backup/etc/
|
||||
${git}/bin/git reset --hard master
|
||||
git reset --hard master
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
writeShellApplication,
|
||||
dmenu,
|
||||
dunst,
|
||||
bc
|
||||
bc,
|
||||
firefox,
|
||||
i3
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -58,6 +60,7 @@ let
|
|||
name = "dmenu-custom-scripts-system";
|
||||
|
||||
runtimeInputs = [
|
||||
i3
|
||||
dmenu
|
||||
dunst
|
||||
];
|
||||
|
@ -70,6 +73,7 @@ let
|
|||
|
||||
runtimeInputs = [
|
||||
dmenu
|
||||
firefox
|
||||
];
|
||||
|
||||
text = ''
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
{ writeShellApplication }:
|
||||
{
|
||||
writeShellApplication,
|
||||
git
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "custom-push-etckeeper";
|
||||
|
||||
runtimeInputs = [
|
||||
git
|
||||
];
|
||||
|
||||
text = ''
|
||||
mkdir /tmp/etckeeper
|
||||
cd /tmp/etckeeper
|
||||
|
|
|
@ -10,7 +10,12 @@ let
|
|||
|
||||
in writeShellApplication {
|
||||
name = "sqlformat";
|
||||
|
||||
runtimeInputs = [
|
||||
python
|
||||
];
|
||||
|
||||
text = ''
|
||||
${python}/bin/python3 -m sqlparse --keywords upper --identifiers lower --reindent_aligned --indent_width 4 <(cat -)
|
||||
python3 -m sqlparse --keywords upper --identifiers lower --reindent_aligned --indent_width 4 <(cat -)
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue