-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·50 lines (45 loc) · 2.07 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·50 lines (45 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Variables
USER="spiderunderurbed"
DIR="acer-predator-turbo-and-rgb-keyboard-linux-module"
SOURCE_FOLDER="./spiderunderurbed" # Folder to move items from
HOME_DIR="home-manager"
UUID=$(id -u spiderunderurbed)
# Check if the directory exists
if [ -d "$DIR" ]; then
echo "Directory '$DIR' already exists."
else
echo "Directory '$DIR' does not exist. Cloning repository..."
git clone https://github.com/JafarAkhondali/acer-predator-turbo-and-rgb-keyboard-linux-module
fi
# Check if the source folder exists and has files
if [ -d "$SOURCE_FOLDER" ]; then
if [ "$(ls -A "$SOURCE_FOLDER")" ]; then # Check if directory is not empty
echo "Moving files from '$SOURCE_FOLDER' to /home/$USER/"
mv "$SOURCE_FOLDER"/* "/home/$USER/"
else
echo "Source folder '$SOURCE_FOLDER' is empty. No files to move."
fi
else
echo "Source folder '$SOURCE_FOLDER' does not exist."
fi
# Check if the /home/$USER directory exists
if [ ! -d "/home/$USER/$HOME_DIR" ] || [ ! "$(ls -A /home/$USER/$HOME_DIR)" ]; then
echo "Directory '/home/$USER/$HOME_DIR' does not exist or is empty. Cloning and moving files..."
mkdir -p "/home/$USER/$HOME_DIR"
git clone https://github.com/SpiderUnderUrBed/home-manager.git /home/$USER/$HOME_DIR/home-manager
mv /home/$USER/$HOME_DIR/home-manager/* /home/$USER/$HOME_DIR/
rm -rf /home/$USER/$HOME_DIR/home-manager
else
echo "/home/$USER/$HOME_DIR directory exists and is not empty. Skipping creation and cloning."
fi
#cd /etc/nixos
#Download python extention
#Download the sober flatpakref
#ln -s /home/nixos/spiderunderurbed/home-manager/ /etc/nixos/spiderunderurbed/
ln -s /home/$USER/$HOME_DIR /etc/nixos/$USER
ln -s /etc/nixos/tilers/hyprland/hyprland.conf /etc/nixos/$USER/tilers/hyprland/hyprland.conf
ln -s /etc/nixos/tilers/hyprland/hyprland.nix /etc/nixos/$USER/tilers/hyprland/hyprland.nix
ln -s /etc/nixos/tilers/hyprland/hyprland-module /etc/nixos/$USER/tilers/hyprland/
chown -R spiderunderurbed:users /etc/nixos/spiderunderurbed/
#chmod $UUID /etc/nixos/spiderunderurbed/
chmod 705 /etc/nixos/spiderunderurbed/*