1
0
forked from extern/nix-config

Add 01x scripts

This commit is contained in:
Donovan Glover 2018-08-31 15:30:43 -04:00
parent ce41936d10
commit bfcd75107e
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
5 changed files with 89 additions and 0 deletions

25
sh/011-hwclock Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
#
# Set your timezone and update the hardware clock, assuming
# it is currently set to UTC. Note that if you want to use
# multiple operating systems on the same hardware, you
# shouldn't do this.
#
# Check whether or not your hardware clock (RTC) is localtime:
# timedatectl | grep local
#
# Change hardware clock to localtime:
# timedatectl set-local-rtc 1
#
# Change hardware clock back to UTC:
# timedatectl set-local-rtc 0
#
# Note that RTC (the hardware clock) stands for "Real Time Clock"
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
arch-chroot /mnt ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
arch-chroot /mnt hwclock --systohc

16
sh/012-hostname Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
#
# Set the hostname in all the necessary places.
#
# Note that if your system has a permanent IP address, that
# should be used instead of 127.0.0.1.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
$HOSTNAME = "arch"
echo "$HOSTNAME" > /mnt/etc/hostname
echo "127.0.1.1 $HOSTNAME.localdomain $HOSTNAME" >> /mnt/etc/hosts

23
sh/013-localization Normal file
View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# Set the language to English and use the en_US.UTF-8 locale.
# Then, generate it.
#
# Next, explicitly set the keymap to US.
#
# Note that we also change the terminal font to a bigger one
# (terminus-font) since this setting also uses vconsole.conf.
# Use `latarcyrheb-sun32` if you want to use the default
# terminal font instead.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf
echo "en_US.UTF-8 UTF-8" > /mnt/etc/locale.gen
arch-chroot /mnt locale-gen
echo "KEYMAP=us" > /mnt/etc/vconsole.conf
echo "FONT=ter-132n" >> /mnt/etc/vconsole.conf

14
sh/014-systemd Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
#
# Change the systemd wait time from 90s to 10s, preventing the
# system from hanging at shutdown.
#
# https://unix.stackexchange.com/questions/273876
# https://old.reddit.com/r/archlinux/comments/4bawf7
set -xe
SYSTEMD="/mnt/etc/systemd/system.conf"
echo "DefaultTimeoutStartSec=10s" >> $SYSTEMD
echo "DefaultTimeoutStopSec=10s" >> $SYSTEMD

11
sh/015-pacman Normal file
View File

@ -0,0 +1,11 @@
#!/bin/sh
#
# Enable colors in pacman by uncommenting the Color line.
#
# https://wiki.archlinux.org/index.php/Color_output_in_console#pacman
set -xe
PACMAN="/mnt/etc/pacman.conf"
sed -i '/Color/s/^#//g' $PACMAN