mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-22 06:44:41 +01:00
feat:added auto NTP and timezone handling
This commit is contained in:
parent
8b033f7fc1
commit
101b00c4fd
6
config/networkmanager/09-timezone
Normal file
6
config/networkmanager/09-timezone
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
case "$2" in
|
||||||
|
up)
|
||||||
|
timedatectl set-timezone "$(curl --fail https://ipapi.co/timezone)"
|
||||||
|
;;
|
||||||
|
esac
|
@ -75,6 +75,13 @@ function install_trizen {
|
|||||||
sudo rm -dRf trizen/
|
sudo rm -dRf trizen/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Sets up time and date related stuff
|
||||||
|
function setDateTimeConfig {
|
||||||
|
systemctl enable ntpd
|
||||||
|
timedatectl set-ntp true
|
||||||
|
sudo ln -sf "$PWD"/config/networkmanager/09-timezone /etc/NetworkManager/dispatcher.d/09-timezone
|
||||||
|
}
|
||||||
|
|
||||||
# install other configs
|
# install other configs
|
||||||
function install_config {
|
function install_config {
|
||||||
|
|
||||||
@ -123,6 +130,8 @@ function install_config {
|
|||||||
# system fixes
|
# system fixes
|
||||||
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
|
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
|
||||||
mkdir -p ~/Pictures/Screenshots
|
mkdir -p ~/Pictures/Screenshots
|
||||||
|
|
||||||
|
setDateTimeConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
# Installs the dependencies on Arch Linux
|
# Installs the dependencies on Arch Linux
|
||||||
|
Loading…
Reference in New Issue
Block a user