mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
chore: removed other users and systems
This commit is contained in:
parent
2b4ad99e25
commit
233cab07dd
135 changed files with 216 additions and 2462 deletions
19
profiles/user0/files/scripts/get_weather.sh
Executable file
19
profiles/user0/files/scripts/get_weather.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
for i in {1..5}
|
||||
do
|
||||
text=$(curl -s "https://wttr.in/$1?format=1")
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
text=$(echo "$text" | sed -E "s/\s+/ /g")
|
||||
tooltip=$(curl -s "https://wttr.in/$1?format=4")
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
|
||||
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"
|
27
profiles/user0/files/scripts/list.sh
Executable file
27
profiles/user0/files/scripts/list.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Function to list directories recursively and sort them alphabetically
|
||||
list_directories() {
|
||||
local parent_dir=$1
|
||||
local output_file=$2
|
||||
|
||||
# Clear the output file if it exists
|
||||
> "$output_file"
|
||||
|
||||
# Recursively find and list directories, then sort them and write to the output file
|
||||
while IFS= read -r dir; do
|
||||
echo "$dir" >> "$output_file"
|
||||
done < <(find "$parent_dir" -type d | sort)
|
||||
}
|
||||
|
||||
# Main script execution
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 parent_directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
parent_directory=$1
|
||||
output_file="nested_directories.txt"
|
||||
|
||||
list_directories "$parent_directory" "$output_file"
|
||||
echo "Directory paths have been written to $output_file"
|
3
profiles/user0/files/scripts/loop.sh
Executable file
3
profiles/user0/files/scripts/loop.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
while true ; do date ; natpmpc -a 1 0 udp 60 -g 10.2.0.1 && natpmpc -a 1 0 tcp 60 -g 10.2.0.1 || { echo -e "ERROR with natpmpc command \a" ; break ; } ; sleep 45 ; done
|
9
profiles/user0/files/scripts/modnix.sh
Executable file
9
profiles/user0/files/scripts/modnix.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cp /etc/nixos/configuration.nix /etc/nixos/configuration.nix.backup
|
||||
|
||||
sed -i '/services\.printing\.enable = true;/a\ nix.settings.experimental-features = ["nix-command" "flakes"];\n services.openssh.enable = true;' /etc/nixos/configuration.nix
|
||||
sed -i '/thunderbird/a\ git\n vscode\n tomb' /etc/nixos/configuration.nix
|
||||
swapoff -a
|
||||
|
||||
echo "/etc/nixos/configuration.nix updated successfully."
|
11
profiles/user0/files/scripts/reinstall.sh
Executable file
11
profiles/user0/files/scripts/reinstall.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
mkdir -p /var/lib/sops-nix
|
||||
mkdir -p /home/nick/.config/sops/age
|
||||
|
||||
cp /run/media/nick/crypt/key.txt /home/nick/.config/sops/age/keys.txt
|
||||
cp /run/media/nick/crypt/key.txt /var/lib/sops-nix/key.txt
|
||||
|
||||
swapon -a
|
||||
|
||||
echo "SOPS keys transferred successfully."
|
Loading…
Add table
Add a link
Reference in a new issue