Fixed phoenix script
This commit is contained in:
@@ -30,10 +30,9 @@
|
|||||||
chown -R 0:0 ${config.systemSettings.dotfilesDir};
|
chown -R 0:0 ${config.systemSettings.dotfilesDir};
|
||||||
chown -R 0:0 ${config.systemSettings.secretsFlakeDir};
|
chown -R 0:0 ${config.systemSettings.secretsFlakeDir};
|
||||||
pushd ${config.systemSettings.dotfilesDir} &> /dev/null;
|
pushd ${config.systemSettings.dotfilesDir} &> /dev/null;
|
||||||
nix flake update secrets;
|
|
||||||
nixos-rebuild switch;
|
nixos-rebuild switch;
|
||||||
exit 0;
|
|
||||||
popd &> /dev/null;
|
popd &> /dev/null;
|
||||||
|
exit 0;
|
||||||
elif [ "$1" = "update" ]; then
|
elif [ "$1" = "update" ]; then
|
||||||
pushd ${config.systemSettings.dotfilesDir} &> /dev/null;
|
pushd ${config.systemSettings.dotfilesDir} &> /dev/null;
|
||||||
nix flake update "''${@:2}";
|
nix flake update "''${@:2}";
|
||||||
@@ -48,7 +47,6 @@
|
|||||||
if [ "$#" -gt 1 ]; then
|
if [ "$#" -gt 1 ]; then
|
||||||
echo "Warning: The 'pull' command has no subcommands (no $2 subcommand)";
|
echo "Warning: The 'pull' command has no subcommands (no $2 subcommand)";
|
||||||
fi
|
fi
|
||||||
exit 0;
|
|
||||||
chown -R $DOAS_USER:users ${config.systemSettings.dotfilesDir};
|
chown -R $DOAS_USER:users ${config.systemSettings.dotfilesDir};
|
||||||
chown -R $DOAS_USER:users ${config.systemSettings.secretsFlakeDir};
|
chown -R $DOAS_USER:users ${config.systemSettings.secretsFlakeDir};
|
||||||
pushd ${config.systemSettings.dotfilesDir} &> /dev/null;
|
pushd ${config.systemSettings.dotfilesDir} &> /dev/null;
|
||||||
@@ -63,6 +61,7 @@
|
|||||||
popd &> /dev/null;
|
popd &> /dev/null;
|
||||||
chown -R 0:0 ${config.systemSettings.dotfilesDir};
|
chown -R 0:0 ${config.systemSettings.dotfilesDir};
|
||||||
chown -R 0:0 ${config.systemSettings.secretsFlakeDir};
|
chown -R 0:0 ${config.systemSettings.secretsFlakeDir};
|
||||||
|
exit 0;
|
||||||
# TODO allow specifying host with $2 in build subcommand
|
# TODO allow specifying host with $2 in build subcommand
|
||||||
elif [ "$1" = "build" ]; then
|
elif [ "$1" = "build" ]; then
|
||||||
if [ "$#" -gt 1 ]; then
|
if [ "$#" -gt 1 ]; then
|
||||||
@@ -110,6 +109,7 @@
|
|||||||
else
|
else
|
||||||
nix-collect-garbage --delete-older-than 30d;
|
nix-collect-garbage --delete-older-than 30d;
|
||||||
fi
|
fi
|
||||||
|
exit 0;
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user