mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-08 01:14:01 +01:00
Add 01x scripts
This commit is contained in:
parent
ce41936d10
commit
bfcd75107e
25
sh/011-hwclock
Normal file
25
sh/011-hwclock
Normal 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
16
sh/012-hostname
Normal 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
23
sh/013-localization
Normal 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
14
sh/014-systemd
Normal 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
11
sh/015-pacman
Normal 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
|
Loading…
Reference in New Issue
Block a user