diff --git a/options/home/dev.nix b/options/home/dev.nix index 83e841f..f06e10a 100644 --- a/options/home/dev.nix +++ b/options/home/dev.nix @@ -136,6 +136,7 @@ in unadd = "reset"; d = "diff"; ds = "diff --staged"; + ch = "checkout"; }; extraConfig = { init = { diff --git a/users/geekiot/scripts/default.nix b/users/geekiot/scripts/default.nix index 02376c4..5dd14f1 100644 --- a/users/geekiot/scripts/default.nix +++ b/users/geekiot/scripts/default.nix @@ -7,7 +7,7 @@ pkgs: { export my_wd=$PWD cd ${configPath} - if [ ! -d ./${secretsPath} ]; then + if [ ! -d "${secretsPath}" ]; then echo "Error: ${secretsPath} directory not found in ${configPath}" echo "System not updated!" cd $my_wd @@ -15,7 +15,7 @@ pkgs: { exit 1 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 "System not updated!" cd $my_wd @@ -24,7 +24,7 @@ pkgs: { fi mkdir ./secrets - cp ./${secretsPath}/*.yaml ./secrets/ + cp ${secretsPath}/*.yaml ./secrets/ git add ./secrets/*.yaml if sudo nixos-rebuild switch --flake . "$@"; then