2025.04.30-20:50

This commit is contained in:
2025-04-30 20:47:57 +02:00
commit 8065685ccb
153 changed files with 6149 additions and 0 deletions

View File

@ -0,0 +1,62 @@
#!/usr/bin/env bash
#
################################################################################
#
#
# post-installation script for NixOS
#
#
#
################################################################################
#
while :
do
clear
echo ""
echo "\033[1m I N S T A L L NixOS"
echo " --------------------------"
echo "\033[0m"
echo " 01.Copy over configs"
echo " 02.Rebuld System"
echo " 03.Upgrade System"
echo " 04.Cleanup System"
echo ""
echo " x. Exit"
echo ""
echo -n " Please enter option [01 - 05]"
read opt
case $opt in
##################################################################################
01) echo "************ Copy over configs **********************";
##################################################################################
sudo cp /etc/nixos /etc/bak.nixos
sudo cp -vf *.nix /etc/nixos/
sudo cp -vrf home /etc/nixos/
sudo cp -vrf config /etc/nixos/
sudo chown -R root:root /etc/nixos/
;;
##################################################################################
02) echo "************ Rebuld System ****************";
##################################################################################
sudo nixos-rebuild switsh
;;
##################################################################################
03) echo "************ Upgrade System *****************";
##################################################################################
sudo nixos-rebuild switsh --upgrade
;;
##################################################################################
04) echo "************ Cleanup System ******************";
##################################################################################
nix-collect-garbage -d && sudo nix-collect-garbage -d
;;
x) echo "";
exit 1;;
*) echo " Press [enter] key to continue. . .";
read enterKey;;
esac
done