fix: fix scripts

This commit is contained in:
Kirill Samoylenkov 2025-09-30 09:21:46 +05:00
parent 6dcf2f6828
commit 00ea2b0c36
2 changed files with 4 additions and 3 deletions

View file

@ -136,6 +136,7 @@ in
unadd = "reset"; unadd = "reset";
d = "diff"; d = "diff";
ds = "diff --staged"; ds = "diff --staged";
ch = "checkout";
}; };
extraConfig = { extraConfig = {
init = { init = {

View file

@ -7,7 +7,7 @@ pkgs: {
export my_wd=$PWD export my_wd=$PWD
cd ${configPath} cd ${configPath}
if [ ! -d ./${secretsPath} ]; then if [ ! -d "${secretsPath}" ]; then
echo "Error: ${secretsPath} directory not found in ${configPath}" echo "Error: ${secretsPath} directory not found in ${configPath}"
echo "System not updated!" echo "System not updated!"
cd $my_wd cd $my_wd
@ -15,7 +15,7 @@ pkgs: {
exit 1 exit 1
fi fi
if [ -z "$(find ./${secretsPath} -maxdepth 1 -name '*.yaml' -print -quit)" ]; then if [ -z "$(find "${secretsPath}" -maxdepth 1 -name '*.yaml' -print -quit)" ]; then
echo "Error: No .yaml files found in ${secretsPath} directory" echo "Error: No .yaml files found in ${secretsPath} directory"
echo "System not updated!" echo "System not updated!"
cd $my_wd cd $my_wd
@ -24,7 +24,7 @@ pkgs: {
fi fi
mkdir ./secrets mkdir ./secrets
cp ./${secretsPath}/*.yaml ./secrets/ cp ${secretsPath}/*.yaml ./secrets/
git add ./secrets/*.yaml git add ./secrets/*.yaml
if sudo nixos-rebuild switch --flake . "$@"; then if sudo nixos-rebuild switch --flake . "$@"; then