fix: fix scripts
This commit is contained in:
parent
6dcf2f6828
commit
00ea2b0c36
2 changed files with 4 additions and 3 deletions
|
|
@ -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 = {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Reference in a new issue