refactor(bash): make chore a script instead of an alias
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-03-13 12:52:07 -04:00
parent cc4ad85325
commit ad10a72f3c
2 changed files with 23 additions and 15 deletions

View file

@ -114,24 +114,10 @@ in {
# Add whitespace after, to allow # Add whitespace after, to allow
# sudo to inherit all other aliases # sudo to inherit all other aliases
sudo = "sudo "; sudo = "sudo ";
frick = "sudo $(fc -ln -1)";
ls = "ls -lah --color=auto"; ls = "ls -lah --color=auto";
tree = "tree -a -I node_modules"; tree = "tree -a -I node_modules";
cp = "cp -r"; cp = "cp -r";
chore =
/*
bash
*/
''
(
cd ~/.nix
git add flake.lock
git commit -m 'chore: update flake.lock'
git push
)
'';
}; };
#profileExtra = '' #profileExtra = ''

View file

@ -1,4 +1,10 @@
{pkgs, ...}: { {
config,
pkgs,
...
}: let
inherit (config.vars) mainUser;
in {
programs = { programs = {
git = { git = {
enable = true; enable = true;
@ -62,4 +68,20 @@
}; };
}; };
}; };
home.packages = with pkgs; [
(writeShellApplication {
name = "chore";
runtimeInputs = [git];
text = ''
DIR=''${1:-"/home/${mainUser}/.nix"}
cd "$DIR"
git add flake.lock
git commit -m 'chore: update flake.lock'
git push
'';
})
];
} }