Merge branch 'arch' into gentoo

This commit is contained in:
ItsDrike 2021-07-14 14:32:30 +02:00
commit 992148a859
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
8 changed files with 53 additions and 37 deletions

View file

@ -1,7 +1,7 @@
# /etc/hosts: Local Host Database
# See hosts(5) for details
#
# This file describes a number of aliases-to-address mappings for the for
# This file describes a number of aliases-to-address mappings for the for
# local hosts that share this file.
#
# The format of lines in this file is:
@ -10,34 +10,36 @@
#
# The fields can be separated by any number of spaces or tabs.
#
# In the presence of the domain name service or NIS, this file may not be
# In the presence of the domain name service or NIS, this file may not be
# consulted at all; see /etc/host.conf for the resolution order.
#
# According to RFC 1918, you can use the following IP networks for private
# According to RFC 1918, you can use the following IP networks for private
# nets which will never be connected to the Internet:
#
# 10.0.0.0 - 10.255.255.255
# 172.16.0.0 - 172.31.255.255
# 192.168.0.0 - 192.168.255.255
#
# In case you want to be able to connect directly to the Internet (i.e. not
# behind a NAT, ADSL router, etc...), you need real official assigned
# numbers. Do not try to invent your own network numbers but instead get one
# from your network provider (if any) or from your regional registry (ARIN,
# In case you want to be able to connect directly to the Internet (i.e. not
# behind a NAT, ADSL router, etc...), you need real official assigned
# numbers. Do not try to invent your own network numbers but instead get one
# from your network provider (if any) or from your regional registry (ARIN,
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
# IPv4 and IPv6 localhost aliases
127.0.0.1 localhost
::1 localhost
127.0.0.1 localhost
::1 localhost
# Current system definition
127.0.1.1 your_hostname.localdomain your_hostname
127.0.1.1 primary.localdomain primary
# Extra systems on the network
#192.168.0.102 device2.localdomain device2
192.168.0.107 localserver.localdomain localserver
192.168.0.10 pihole.localdomain pihole
# DNS servers
45.90.30.0 nextcloud-dns
1.1.1.1 couldflare-dns
1.0.0.1 cloudflare-dns2
8.8.8.8 google-dns
# Custom aliases

View file

@ -3,7 +3,7 @@
# Set umask, 027 might be too strict for some people. if that's the case
# you can fall back to 022 (allowing others to read everything by default)
# or even to 002 (allowing groups to write into files just like owners)
umask 027
umask 022
# Append "$1" to $PATH when not already in.
# This function API is accessible to scripts in /etc/profile.d
@ -17,9 +17,12 @@ append_path () {
}
# Append our default paths
append_path '/sbin'
append_path '/usr/sbin'
append_path '/bin'
append_path '/usr/bin'
append_path '/usr/local/sbin'
append_path '/usr/local/bin'
append_path '/usr/bin'
# Force PATH to be environment
export PATH
@ -35,16 +38,6 @@ fi
# Unload our profile API functions
unset -f append_path
# Source global bash config, when interactive but not posix or sh mode
if test "$BASH" &&\
test "$PS1" &&\
test -z "$POSIXLY_CORRECT" &&\
test "${0#-}" != sh &&\
test -r /etc/bash.bashrc
then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

View file

@ -4,13 +4,20 @@
# This will only be applied for non-graphical sessions,
# or whenever root account is logged in
TMOUT=600
readonly TMOUT
# If TMOUT was already set, unset it
unset TMOUT
[ -z "$DISPLAY" ] && export TMOUT;
# Define the timeout delay (seconds)
TIMEOUT=600
# Set TMOUT when display is not set
[ -z "$DISPLAY" ] && export TMOUT=$TIMEOUT;
# Set TMOUT when in TTY
case $(/usr/bin/tty) in
/dev/tty[0-9]*) export TMOUT;;
/dev/tty[0-9]*) export TMOUT=$TIMEOUT;;
esac
[ $UID -eq 0 ] && export TMOUT;
# Set TMOUT when user is root
[ $UID -eq 0 ] && export TMOUT=$TIMEOUT;

View file

@ -2,9 +2,11 @@
# but setting immutable flag to this file fixes that.
# This can be done by running chattr +i /etc/resolv.conf
# This configuration will prefer NextDNS, with fallback
# to CloudFlare DNS and its fallback, and finally
# last fallback to the ISP default
# Prefer local pihole server, if aviable
nameserver 192.168.0.10
# Fallback on common DNS servers, in this order:
# NextDNS -> CloudFlare DNS -> ISP default DNS
nameserver 45.90.30.0
nameserver 1.1.1.1
nameserver 1.0.0.1

View file

@ -6,7 +6,7 @@ if [ "$EUID" -ne 0 ]; then
fi
# Make sure the partition is mounted according to fstab
mount /mnt/arch
mount /mnt/arch 2> /dev/null
# Mount necessary directories for chroot to be possible
mount --types proc /proc /mnt/arch/proc
@ -15,8 +15,8 @@ mount --make-rslave /mnt/arch/sys
mount --rbind /dev /mnt/arch/dev
mount --make-rslave /mnt/arch/dev
# Chroot with bash shell
chroot /mnt/arch /bin/bash
# Chroot with zsh shell
chroot /mnt/arch /bin/zsh --login
# Unmount recursively mounted directories
umount -l /mnt/arch/dev{/shm,/pts,}

View file

@ -10,8 +10,8 @@ mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
# Chroot with bash shell
chroot /mnt/gentoo /bin/bash
# Chroot with zsh shell
chroot /mnt/gentoo /bin/zsh --login
# Unmount recursively mounted directories
umount -l /mnt/gentoo/dev{/shm,/pts,}

View file

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=xmonad
Comment=A lightweight window manager
Exec=/etc/X11/Sessions/xmonad
TryExec=xmonad
Icon=
X-GNOME-WMName=Xmonad
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
X-GNOME-Autostart-Notify=false