refactor: add NixOS configuration files for server and workstation setups
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
This commit is contained in:
@ -7,7 +7,6 @@ help() {
|
||||
printfe "%s\n" "green" " --ha, -H Upgrade Home Manager packages."
|
||||
printfe "%s\n" "green" " --ansible, -A Upgrade Ansible packages."
|
||||
printfe "%s\n" "green" " --ansible-verbose Upgrade Ansible packages with verbose output. (-vvv)"
|
||||
printfe "%s\n" "green" " --nix, -X Update Home Manager flake."
|
||||
printfe "%s\n" "green" " --full-speed, -F Upgrade packages and use all available cores for compilation. (Default: 8 cores)"
|
||||
printfe "%s\n" "green" " --help, -h Display this help message."
|
||||
exit 0
|
||||
@ -16,7 +15,6 @@ help() {
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
--ha|-H) RUN_HA=true ;;
|
||||
--nix|-X) RUN_NIX=true ;;
|
||||
--ansible|-A) RUN_ANSIBLE=true ;;
|
||||
--ansible-verbose)
|
||||
RUN_ANSIBLE=true
|
||||
@ -29,9 +27,8 @@ while [[ "$#" -gt 0 ]]; do
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ -z "$RUN_HA" && -z "$RUN_NIX" && -z "$RUN_ANSIBLE" ]]; then
|
||||
if [[ -z "$RUN_HA" && -z "$RUN_ANSIBLE" ]]; then
|
||||
RUN_HA=true
|
||||
RUN_NIX=true
|
||||
RUN_ANSIBLE=true
|
||||
fi
|
||||
|
||||
@ -46,12 +43,10 @@ fi
|
||||
|
||||
printfe "%s\n" "cyan" "Limiting to $CORES cores with $JOBS jobs."
|
||||
|
||||
if [[ "$RUN_NIX" == true ]]; then
|
||||
if [[ "$RUN_HA" == true ]]; then
|
||||
printfe "%s\n" "cyan" "Updating Home Manager flake..."
|
||||
cd $HOME/dotfiles/config/home-manager && nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update
|
||||
fi
|
||||
|
||||
if [[ "$RUN_HA" == true ]]; then
|
||||
if command -v home-manager &> /dev/null; then
|
||||
printfe "%s\n" "cyan" "Cleaning old backup files..."
|
||||
rm -rf $HOME/.config/mimeapps.list.backup
|
||||
|
Reference in New Issue
Block a user