rytsh / dotfiles

something about my machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

configurations

Based on Arch Linux

minimal

Install

Arch Linux

https://wiki.archlinux.org/title/Installation_guide

Open system with iso file.

Partition

List all partitions

fdisk -l

Create new partition

cfdisk /dev/sda
# Select gpt
# Make 2 partition
## Partition 1 EFI 300M
## Partition 2 Linux -
## Write and quit

Format partitions

mkfs.fat -F 32 /dev/sda1
mkfs.ext4 /dev/sda2

Mount partitions

mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

Installation

Edit /etc/pacman.d/mirrorlist and move your country to the top

Install to new system

pacstrap /mnt base base-devel linux linux-firmware vim dhclient amd-ucode
# amd-ucode intel-ucode

Generate fstab

genfstab -U /mnt >> /mnt/etc/fstab

Chroot and some configuration

arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
hwclock --systohc
echo "tr_TR.UTF-8 UTF-8" >> /etc/locale.gen
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=tr_TR.UTF-8" >> /etc/locale.conf
echo "LC_MESSAGES=en_US.UTF-8" >> /etc/locale.conf
echo "KEYMAP=uk" >> /etc/vconsole.conf
# set hostname
echo "archi" > /etc/hostname
# set hosts file
echo 127.0.0.1 localhost >> /etc/hosts
# root password
passwd

Add systemd-boot

bootctl install

Add entry to bootloader

cat << EOF > /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options root=/dev/sda2
EOF

Exit in chroot and umount

umount -R /mnt

Reboot

reboot
User
pacman -S sudo

Give permissions to sudo group

echo "%sudo ALL=(ALL) ALL" >> /etc/sudoers.d/10-sudo

Create sudo group in system

groupadd -r sudo

Create users group

groupadd users

Create user

useradd -m -g users -G sudo -s /bin/bash ray

Give password to user

passwd ray

Exit terminal and login as user

Packages

Install packages

Font, Terminal, Window manager

sudo pacman -S ttf-anonymous-pro xterm openbox obconf hsetroot unclutter git openssh xorg-xinit xorg-server bash-completion
Dotfiles

Clone dotfiles

git clone https://github.com/rytsh/dotfiles.git

copy dotfiles to home directory

cp -a dotfiles/home/. ~/
Package managers

homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

yay (AUR)

pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si
Git

GPG sign

Generate new key

gpg --full-gen-key

Real Name: Eray Ates
Email Address: eates23@gmail.com

gpg --list-secret-keys --keyid-format LONG eates23@gmail.com

And copy bold area rsa3072/KEYID 2022-01-01

gpg --armor --export __KEYID__

Add to the gitconfig

git config --global user.signingkey __KEYID__
# git config --file .git/personal user.signingkey __KEYID__

Enable to sign always

git config --global commit.gpgsign true

Set editor to vim

echo export GIT_EDITOR=vim >> ~/.bashrc

Specific folder use different key

Add this config in the ~/.gitconfig

[includeIf "gitdir:~/github/*/"]
	path = ~/.git/personal

And personal file like

[user]
	email = eates23@gmail.com
	name = Eray Ates

Or use with git config -l --file=.git/personal and set new things.

Don't forget to apply this one, if not exist it will use glocal signingkey.

git config --file .git/personal user.signingkey __KEYID__
Network

VM Network Settings

VirtualBox

Add NAT and Host-only network to the VM.

Change names of the interface

cat /etc/udev/rules.d/10-network.rules

Find mac address with ip link command or manual way cat /sys/class/net/enp0s3/address.

Write correct mac address, check virtualbox's network settings.

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="08:00:27:a9:fd:20" NAME="netnat"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="08:00:27:1a:c4:cd" NAME="nethost"

Network Settings

Enable systemd-networkd service

sudo systemctl enable systemd-networkd.service

/etc/systemd/network/20-wired.network

[Match]
Name=nethost

[Network]
DHCP=yes

/etc/systemd/network/21-wired.network

[Match]
Name=netnat

[Network]
DHCP=yes

Check with networkctl list command.

If network changed to get new changes, run manually this command.

sudo dhclient netnat

About

something about my machine

License:MIT License


Languages

Language:Shell 100.0%