refactor(bash): make chore a script instead of an alias

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
common/home/git

View file

@ -1,4 +1,10 @@
{pkgs, ...}: {
{
config,
pkgs,
...
}: let
inherit (config.vars) mainUser;
in {
programs = {
git = {
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
'';
})
];
}