-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathinitial_configuration.sh
executable file
·81 lines (69 loc) · 3.21 KB
/
initial_configuration.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
#==============================================================================
#==============================================================================
# Copyright (c) 2015 Jonathan Yantis
# Released under the MIT license
#==============================================================================
#==============================================================================
###############################################################################
# Change this to your timezone
###############################################################################
timedatectl set-timezone America/Los_Angeles
###############################################################################
# Import any public keys that we need and initalize
# For some reason this wouldn't stick in the docker container.
###############################################################################
pacman-key --init
# Import infinality repo key
pacman-key -a /var/cache/keys/962DDE58.pub
pacman-key --lsign 962DDE58
###############################################################################
# Set the keyboard LEDs to light up
# change this to 0 or your desired brightness level
###############################################################################
echo "255" > /sys/class/leds/smc::kbd_backlight/brightness
###############################################################################
# Set this to your desired cpu power mode.
###############################################################################
if hash cpupower 2> /dev/null; then
# cpupower frequency-set -g performance
cpupower frequency-set -g powersave
fi
###############################################################################
# NVIDIA
# If the machine has an nvidia card then run nvidia-xconfig on it
###############################################################################
if hash nvidia-xconfig 2> /dev/null; then
nvidia-xconfig \
--add-argb-glx-visuals \
--allow-glx-with-composite \
--composite \
-no-logo \
--render-accel \
-o /usr/share/X11/xorg.conf.d/20-nvidia.conf
fi
###############################################################################
# AMD/ATI
# If the machine has an AMD/ATI card then run aticonfig on it
###############################################################################
if hash aticonfig 2> /dev/null; then
aticonfig \
--initial \
--output /usr/share/X11/xorg.conf.d/20-radeon.conf
# Import catalyst repo key
pacman-key -a /var/cache/keys/653C3094.pub
pacman-key --lsign 653C3094
fi
###############################################################################
# Setup Sound
# By default ALSA has all channels muted. Those have to be unmuted manually
###############################################################################
amixer sset Master unmute
###############################################################################
# Cleanup
# This is supposed to delete us but it still is around as I see a fragment in the journal
###############################################################################
systemctl disable initial_configuration.service
rm /usr/lib/systemd/system/initial_configuration.service
rm $0