Initial commit
This commit is contained in:
commit
18ef954234
|
@ -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` <br> (`/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 <user>`
|
||||
- `passwd <user>`
|
||||
- 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`
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
#timeout 3
|
||||
#console-mode keep
|
||||
default arch.conf
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
LANG=fi_FI.UTF-8
|
||||
LC_COLLATE=C
|
|
@ -0,0 +1 @@
|
|||
blacklist pcspkr
|
|
@ -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
|
|
@ -0,0 +1,9 @@
|
|||
[Trigger]
|
||||
Type = Package
|
||||
Operation = Upgrade
|
||||
Target = systemd
|
||||
|
||||
[Action]
|
||||
Description = Updating systemd-boot
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/bootctl update
|
|
@ -0,0 +1 @@
|
|||
KEYMAP=fi
|
|
@ -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'
|
|
@ -0,0 +1,11 @@
|
|||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
|
||||
export EDITOR=/usr/bin/vim
|
||||
|
||||
if [[ "$PATH" != "*~/.bin:*" ]]; then
|
||||
export PATH=~/.bin:$PATH
|
||||
fi
|
|
@ -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
|
|
@ -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
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
set show-all-if-ambiguous on
|
||||
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue