commit 18ef954234348c3c5563e0a63553152888548047 Author: Jarno Date: Sun Aug 2 09:06:25 2020 +0300 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..57f40a4 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# arch_installation +My personal Arch installation notes + + Suitable for systems with intel processors/integrated graphics + + "create file" means copy from repository + +- `loadkeys fi` - load finnish keyboard layout +- `timedatectl set-ntp true` - NTP on +- +- Create and mount the partitions. + - `systemd-boot` requires EFI to be mounted at `/boot`!! +- Install system base with `pacstrap`: + +```pacstrap -i /mnt base linux-zen linux-firmware base-devel git vim man dosfstools ntfs-3g ufw tlp tlp-rdw gnome``` + +- `genfstab -U /mnt >> /mnt/etc/fstab` - generate `fstab` + - If using bind mounts, remove `/mnt` from mountpoint!! +- `arch-chroot /mnt` - Change root in to the new installation +- `timedatectl set-timezone Europe/Helsinki` - set time zone +- `hwclock --systohc` - syncronize HW clock with system clock +- (optional) enable swapfile: + - `fallocate -l 8G /swapfile` + - `mkswap /swapfile` + - `swapon /swapfile` + - Add entry for swapfile to `fstab`
(`/swapfile none swap defaults 0 0`) +- Locale generation: + - `echo "fi_FI.UTF-8 UTF-8" >> /etc/locale.gen` - set locale to generate + - `locale-gen` +- `echo -e "LANG=fi_FI.UTF-8\nLC_COLLATE=C" >> /etc/locale.conf"` - set system default locale +- `echo "KEYMAP=fi" >> /etc/vconsole.conf` - set persistent TTY keyboard layout +- create `/etc/hostname` and `/etc/hosts` +- modify `/etc/mkinitcpio.conf`, add `i915` kernel module and replace `udev`-hook with `systemd`-hook (file included) +- recreate `initramfs`: + - `mkinitcpio -P` +- Install `systemd-boot` bootloader: + - `bootctl install` + - add `/boot/loader/entries/arch.conf` + - set default entry in `/boot/loader/loader.conf` + - create pacman hook for updating systemd-boot: `/etc/pacman.d/hooks/100-systemd-boot.hook` + - run `bootctl update` +- edit `/etc/sudoers` with `visudo`: + - uncomment `wheel` group +- edit `/etc/pacman.conf` +- set root password: `passwd` +- create administrator user: + - `useradd -m -G wheel,storage,power,uucp,tty ` + - `passwd ` +- enable `NetworkManager` and `gdm` + +- reboot + +- After rebooting, create file `/var/lib/gdm/.config/pulse/default.pa` + - Fixes gdm issue with bluetooth headset + +- Enable SSD periodic trimming: + `sudo systemctl enable --now fstrim.timer` diff --git a/boot/loader/entries/arch.conf b/boot/loader/entries/arch.conf new file mode 100755 index 0000000..d42b6c0 --- /dev/null +++ b/boot/loader/entries/arch.conf @@ -0,0 +1,5 @@ +title "Arch Linux" +linux /vmlinuz-linux-zen +initrd /intel-ucode.img +initrd /initramfs-linux-zen.img +options root=LABEL="Arch_root" rw quiet loglevel=2 vga=current rd.udev.log_priority=2 i915.fastboot=1 xhci_hcd.quirks=270336 diff --git a/boot/loader/loader.conf b/boot/loader/loader.conf new file mode 100755 index 0000000..d414adf --- /dev/null +++ b/boot/loader/loader.conf @@ -0,0 +1,3 @@ +#timeout 3 +#console-mode keep +default arch.conf diff --git a/etc/hosts b/etc/hosts new file mode 100644 index 0000000..3230f1f --- /dev/null +++ b/etc/hosts @@ -0,0 +1,6 @@ +# Static table lookup for hostnames. +# See hosts(5) for details. + +127.0.0.1 localhost +::1 localhost +127.0.1.1 localhost.localdomain localhost diff --git a/etc/locale.conf b/etc/locale.conf new file mode 100644 index 0000000..e6d33fd --- /dev/null +++ b/etc/locale.conf @@ -0,0 +1,2 @@ +LANG=fi_FI.UTF-8 +LC_COLLATE=C diff --git a/etc/modprobe.d/10-nobeep.conf b/etc/modprobe.d/10-nobeep.conf new file mode 100644 index 0000000..b46792e --- /dev/null +++ b/etc/modprobe.d/10-nobeep.conf @@ -0,0 +1 @@ +blacklist pcspkr diff --git a/etc/pacman.conf b/etc/pacman.conf new file mode 100644 index 0000000..0bd80fd --- /dev/null +++ b/etc/pacman.conf @@ -0,0 +1,99 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +TotalDownload +CheckSpace +VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[community-testing] +#Include = /etc/pacman.d/mirrorlist + +[community] +Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs diff --git a/etc/pacman.d/hooks/100-systemd-boot.hook b/etc/pacman.d/hooks/100-systemd-boot.hook new file mode 100644 index 0000000..5d05981 --- /dev/null +++ b/etc/pacman.d/hooks/100-systemd-boot.hook @@ -0,0 +1,9 @@ +[Trigger] +Type = Package +Operation = Upgrade +Target = systemd + +[Action] +Description = Updating systemd-boot +When = PostTransaction +Exec = /usr/bin/bootctl update diff --git a/etc/vconsole.conf b/etc/vconsole.conf new file mode 100644 index 0000000..264fc1d --- /dev/null +++ b/etc/vconsole.conf @@ -0,0 +1 @@ +KEYMAP=fi diff --git a/home/user/.bash_aliases b/home/user/.bash_aliases new file mode 100644 index 0000000..2b46c62 --- /dev/null +++ b/home/user/.bash_aliases @@ -0,0 +1,13 @@ +alias ls='ls -h --color=auto --group-directories-first' +alias l='ls -l' +alias la='ls -la' +alias c='clear' +alias cd..='cd ..' +alias aur='auracle -C /home/user/aur' +alias makepkg='makepkg -cris' +alias desktop_wake='wol MAC:ADDR:HERE' +alias ssh='TERM=xterm-256color ssh' +alias ip='ip -c' +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' diff --git a/home/user/.bash_profile b/home/user/.bash_profile new file mode 100644 index 0000000..625ead7 --- /dev/null +++ b/home/user/.bash_profile @@ -0,0 +1,11 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc + +export EDITOR=/usr/bin/vim + +if [[ "$PATH" != "*~/.bin:*" ]]; then + export PATH=~/.bin:$PATH +fi diff --git a/home/user/.bash_prompt b/home/user/.bash_prompt new file mode 100644 index 0000000..2c6f133 --- /dev/null +++ b/home/user/.bash_prompt @@ -0,0 +1,43 @@ +# Colors: +BLACK="\[$(tput setaf 0)\]" +RED="\[$(tput setaf 1)\]" +GREEN="\[$(tput setaf 2)\]" +YELLOW="\[$(tput setaf 3)\]" +BLUE="\[$(tput setaf 4)\]" +PURPLE="\[$(tput setaf 5)\]" +CYAN="\[$(tput setaf 6)\]" +WHITE="\[$(tput setaf 7)\]" +RESET="\[$(tput sgr0)\]" + +BOLD="\[$(tput bold)\]" + +BGWHITE="\[$(tput setab 7)\]" +BGRED="\[$(tput setab 1)\]" + +case $HOSTNAME in + host1) + HOSTCOLOR="$CYAN" + ;; + host2) + HOSTCOLOR="$GREEN" + ;; + host3) + HOSTCOLOR="$PURPLE" + ;; + host4) + HOSTCOLOR="$YELLOW" + ;; + *) + HOSTCOLOR="$WHITE" + ;; +esac + +if [[ "$UID" -eq 0 ]]; then + + PS1="$BOLD$BLACK$BGRED[\u\h] \$PWD \$$RESET " + +else + + PS1="$BOLD$WHITE[\u$HOSTCOLOR@\h$WHITE] \$PWD$RESET \$ " + +fi diff --git a/home/user/.bashrc b/home/user/.bashrc new file mode 100644 index 0000000..e20725a --- /dev/null +++ b/home/user/.bashrc @@ -0,0 +1,35 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Start or attach Tmux on every login +#[[ -z "$TMUX" && "$UID" -ne 0 ]] && exec tmux +if which tmux >/dev/null 2>&1; then + #if not inside a tmux session, and if no session is started, start a new session + test -z "$TMUX" && if [[ "$UID" -ne 0 ]];then (tmux attach || tmux new-session); fi +fi + +## Source aliases +if [[ -e ~/.bash_aliases ]]; then + source .bash_aliases +fi + +## Bash completion +if [[ -e /usr/share/bash-completion/bash_completion ]]; then + source /usr/share/bash-completion/bash_completion +fi + +## Command not found +if [[ -e /usr/share/doc/pkgfile/command-not-found.bash ]]; then + source /usr/share/doc/pkgfile/command-not-found.bash +fi + +## Prompt + +if [[ -e ~/.bash_prompt ]]; then + source ~/.bash_prompt +fi + diff --git a/home/user/.inputrc b/home/user/.inputrc new file mode 100644 index 0000000..c84f078 --- /dev/null +++ b/home/user/.inputrc @@ -0,0 +1,2 @@ +set show-all-if-ambiguous on + diff --git a/home/user/.tmux.conf b/home/user/.tmux.conf new file mode 100644 index 0000000..1c8ef1a --- /dev/null +++ b/home/user/.tmux.conf @@ -0,0 +1,74 @@ +## set the default TERM +set -g default-terminal tmux + +## update the TERM variable of terminal emulator when creating a new session or attaching a existing session +set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM' +## determine if we should enable 256-colour support +if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal tmux-256color' + +## Set window titles +set -g set-titles on +set -g set-titles-string "#T" + +## Change default prefix key +#unbind C-b +set -g prefix ö +bind ö send-prefix + +## More logical split commands +bind-key h split-window -h +bind-key v split-window -v + +## Reload configuration +bind r source-file ~/.tmux.conf + +## Mouse control +set -g mouse on +set -g history-limit 30000 + +## Copy and paste with X clipboard +# extra commands for interacting with the ICCCM clipboard +bind C-c run "tmux save-buffer - | xclip -i -sel clipboard" +bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" + + +## "Vim friendly config" -- Arch Wiki... +set -sg escape-time 1 +set -g base-index 1 +setw -g pane-base-index 1 + +setw -g monitor-activity on +set -g visual-activity on + +set -g mode-keys vi + +# y and p as in vim +bind Escape copy-mode +unbind p +bind p paste-buffer +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection +bind-key -T copy-mode-vi 'Space' send -X halfpage-down +bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up + +## moving between panes with vim movement keys +#bind h select-pane -L +#bind j select-pane -D +#bind k select-pane -U +#bind l select-pane -R +# +## moving between windows with vim movement keys +#bind -r C-h select-window -t :- +#bind -r C-l select-window -t :+ +# +## resize panes with vim movement keys +#bind -r H resize-pane -L 5 +#bind -r J resize-pane -D 5 +#bind -r K resize-pane -U 5 +#bind -r L resize-pane -R 5 + +## Powerline status bar +#source /usr/lib/python3.8/site-packages/powerline/bindings/tmux/powerline.conf + +## Status bar background color +set -ag status-style bg=cyan diff --git a/var/lib/gdm/.config/pulse/default.pa b/var/lib/gdm/.config/pulse/default.pa new file mode 100644 index 0000000..d6ded7a --- /dev/null +++ b/var/lib/gdm/.config/pulse/default.pa @@ -0,0 +1,14 @@ +#!/usr/bin/pulseaudio -nF +# + +# load system wide configuration +.include /etc/pulse/default.pa + +### unload driver modules for Bluetooth hardware +.ifexists module-bluetooth-policy.so + unload-module module-bluetooth-policy +.endif + +.ifexists module-bluetooth-discover.so + unload-module module-bluetooth-discover +.endif