refactor(bash): make chore a script instead of an alias
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
cc4ad85325
commit
ad10a72f3c
2 changed files with 23 additions and 15 deletions
|
@ -114,24 +114,10 @@ in {
|
|||
# Add whitespace after, to allow
|
||||
# sudo to inherit all other aliases
|
||||
sudo = "sudo ";
|
||||
frick = "sudo $(fc -ln -1)";
|
||||
|
||||
ls = "ls -lah --color=auto";
|
||||
tree = "tree -a -I node_modules";
|
||||
cp = "cp -r";
|
||||
|
||||
chore =
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
''
|
||||
(
|
||||
cd ~/.nix
|
||||
git add flake.lock
|
||||
git commit -m 'chore: update flake.lock'
|
||||
git push
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
#profileExtra = ''
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue