improved
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# debian
|
||||
|
||||
Server (Debian Stable) system general configuration, prepares the system on first boot or anytime.
|
||||
Debian 13 NETig configuration for `server` or `desktop` profiles.
|
||||
|
||||
## Usage
|
||||
|
||||
Run the `run.sh` script.
|
||||
Run the `run.sh` script and choose your profile.
|
||||
|
||||
## Manual tasks
|
||||
|
||||
@@ -20,3 +20,7 @@ And add the following content :
|
||||
# Run the NETig backup script at 4h every monday
|
||||
0 4 * * mon /usr/local/sbin/netig-srv-backup
|
||||
```
|
||||
|
||||
### Desktop
|
||||
|
||||
There is nothing to do, your system is ready to enjoy !
|
||||
|
||||
32
config/qt5ct/qt5ct.conf
Normal file
32
config/qt5ct/qt5ct.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt6ct/colors/airy.conf
|
||||
custom_palette=false
|
||||
icon_theme=Papirus-Dark
|
||||
standard_dialogs=default
|
||||
style=Adwaita-Dark
|
||||
|
||||
[Fonts]
|
||||
fixed="Monospace,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
general="Sans Serif,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
buttonbox_layout=0
|
||||
cursor_flash_time=1200
|
||||
dialog_buttons_have_icons=1
|
||||
double_click_interval=400
|
||||
gui_effects=@Invalid()
|
||||
keyboard_scheme=2
|
||||
menus_have_icons=true
|
||||
show_shortcuts_in_context_menus=true
|
||||
stylesheets=@Invalid()
|
||||
toolbutton_style=4
|
||||
underline_shortcut=1
|
||||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xf6\0\0\x1\x33\0\0\x6\xde\0\0\x4\x3\0\0\x3\xfb\0\0\x1P\0\0\x6\xd9\0\0\x3\xfe\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xfb\0\0\x1P\0\0\x6\xd9\0\0\x3\xfe)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
ignored_applications=@Invalid()
|
||||
32
config/qt6ct/qt6ct.conf
Normal file
32
config/qt6ct/qt6ct.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt6ct/colors/airy.conf
|
||||
custom_palette=false
|
||||
icon_theme=Papirus-Dark
|
||||
standard_dialogs=default
|
||||
style=Adwaita-Dark
|
||||
|
||||
[Fonts]
|
||||
fixed="Monospace,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
general="Sans Serif,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
buttonbox_layout=0
|
||||
cursor_flash_time=1200
|
||||
dialog_buttons_have_icons=1
|
||||
double_click_interval=400
|
||||
gui_effects=@Invalid()
|
||||
keyboard_scheme=2
|
||||
menus_have_icons=true
|
||||
show_shortcuts_in_context_menus=true
|
||||
stylesheets=@Invalid()
|
||||
toolbutton_style=4
|
||||
underline_shortcut=1
|
||||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xf6\0\0\x1\x33\0\0\x6\xde\0\0\x4\x3\0\0\x3\xfb\0\0\x1P\0\0\x6\xd9\0\0\x3\xfe\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xfb\0\0\x1P\0\0\x6\xd9\0\0\x3\xfe)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
ignored_applications=@Invalid()
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
|
||||
# deb-src http://deb.debian.org/debian bookworm main contrib non-free-firmware
|
||||
|
||||
deb http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware
|
||||
# deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware
|
||||
|
||||
# deb http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware
|
||||
# deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware
|
||||
|
||||
deb http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
|
||||
# deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
|
||||
25
modules/desktop.sh
Executable file
25
modules/desktop.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo
|
||||
echo " => Desktop"
|
||||
echo
|
||||
|
||||
# Disable all managed interfaces excerpt loopback from /etc/network/interfaces file to allow NetworkManager to manage them
|
||||
sed -i '/# The primary network interface/Q' /etc/network/interfaces
|
||||
|
||||
# Qt5ct and qt6ct configuration
|
||||
grep -E "(export QT_QPA_PLATFORMTHEME=qt5ct)" /etc/environment > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "export QT_QPA_PLATFORMTHEME=qt5ct" >> /etc/environment
|
||||
fi
|
||||
|
||||
# Copy user config files
|
||||
if [ ! -d ~/.config ]; then
|
||||
mkdir ~/.config
|
||||
fi
|
||||
cp -r config/* ~/.config
|
||||
|
||||
if [ ! -d /etc/skel/.config ]; then
|
||||
mkdir /etc/skel/.config
|
||||
fi
|
||||
cp -r config/* /etc/skel/.config
|
||||
@@ -1,16 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
#############
|
||||
### Docker
|
||||
|
||||
echo
|
||||
echo " => Docker"
|
||||
echo
|
||||
|
||||
if [ -f /usr/bin/docker ]
|
||||
then
|
||||
echo " -> Already done !"
|
||||
else
|
||||
if [ ! -f /usr/bin/docker ]; then
|
||||
# Add Docker's official GPG key
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg --yes
|
||||
|
||||
@@ -1,15 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
#######################
|
||||
### Install packages
|
||||
|
||||
echo
|
||||
echo " => Packages"
|
||||
echo
|
||||
|
||||
pkglist="git
|
||||
htop
|
||||
tree
|
||||
rsync"
|
||||
base="git
|
||||
htop
|
||||
tree
|
||||
rsync"
|
||||
|
||||
apt-get install $pkglist -y
|
||||
server=""
|
||||
|
||||
desktop="adwaita-qt
|
||||
adwaita-qt6
|
||||
qt5ct
|
||||
qt6ct
|
||||
xfce4
|
||||
firefox-esr
|
||||
firefox-esr-l10n-fr
|
||||
libreoffice
|
||||
libreoffice-l10n-fr
|
||||
thunderbird
|
||||
thunderbird-l10n-fr
|
||||
vlc"
|
||||
|
||||
if [ $profile = server ]; then
|
||||
pkglist="$base
|
||||
$server"
|
||||
fi
|
||||
|
||||
if [ $profile = desktop ]; then
|
||||
pkglist="$base
|
||||
$server
|
||||
$desktop"
|
||||
fi
|
||||
|
||||
for i in $pkglist
|
||||
do
|
||||
dpkg -l $i > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
apt-get install $i -y
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
###########################
|
||||
### Repos configuration
|
||||
|
||||
echo
|
||||
echo " => Repos configuration"
|
||||
echo " => Repositories"
|
||||
echo
|
||||
|
||||
cp config/sources.list /etc/apt/sources.list
|
||||
grep -E "(contrib|non-free)" /etc/apt/sources.list > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
sed -i "s/http:\/\/deb.debian.org\/debian\/ trixie main non-free-firmware/& contrib non-free/" /etc/apt/sources.list
|
||||
sed -i "s/http:\/\/security.debian.org\/debian-security trixie-security main non-free-firmware/& contrib non-free/" /etc/apt/sources.list
|
||||
sed -i "s/http:\/\/deb.debian.org\/debian\/ trixie-updates main non-free-firmware/& contrib non-free/" /etc/apt/sources.list
|
||||
fi
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
###################
|
||||
### Copy scripts
|
||||
|
||||
echo
|
||||
echo " => Scripts"
|
||||
echo
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#############
|
||||
### Update
|
||||
|
||||
echo
|
||||
echo " => Update"
|
||||
echo " => Updates"
|
||||
echo
|
||||
|
||||
apt-get update
|
||||
@@ -1,26 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
##########################
|
||||
### Volumes mountpoints
|
||||
|
||||
echo
|
||||
echo " => Volumes mountpoints"
|
||||
echo " => Volumes"
|
||||
echo
|
||||
|
||||
if [ -d /var/netig/srv ]
|
||||
then
|
||||
echo " -> Already done !"
|
||||
else
|
||||
if [ ! -d /var/netig/srv ]; then
|
||||
mkdir -p /var/netig/srv
|
||||
echo
|
||||
echo " => Adjust /etc/fstab accordingly !"
|
||||
echo
|
||||
fi
|
||||
|
||||
if [ -d /var/netig/bak ]
|
||||
then
|
||||
echo " -> Already done !"
|
||||
else
|
||||
if [ ! -d /var/netig/bak ]; then
|
||||
mkdir -p /var/netig/bak
|
||||
echo
|
||||
echo " => Adjust /etc/fstab accordingly !"
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
###########
|
||||
### ZRAM
|
||||
|
||||
echo
|
||||
echo " => ZRAM"
|
||||
echo
|
||||
|
||||
if [ -f /usr/bin/zramswap ]
|
||||
then
|
||||
echo " -> Already done !"
|
||||
else
|
||||
dpkg -l zram-tools > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
apt-get install zram-tools -y
|
||||
sed -i '/#ALGO=lz4/s/^#//g' /etc/default/zramswap
|
||||
sed -i '/#PERCENT=50/s/^#//g' /etc/default/zramswap
|
||||
|
||||
40
run.sh
40
run.sh
@@ -10,13 +10,36 @@ then
|
||||
fi
|
||||
|
||||
# Post-installation
|
||||
modules="repos.sh
|
||||
update.sh
|
||||
pkgs.sh
|
||||
docker.sh
|
||||
zram.sh
|
||||
scripts.sh
|
||||
volumes.sh"
|
||||
while true
|
||||
do
|
||||
echo
|
||||
echo "Is it a server or a desktop machine ? (server/desktop)"
|
||||
read -p "> " answer
|
||||
export profile=$answer
|
||||
case $answer in
|
||||
server)
|
||||
modules="repos.sh
|
||||
updates.sh
|
||||
pkgs.sh
|
||||
docker.sh
|
||||
zram.sh
|
||||
scripts.sh
|
||||
volumes.sh"
|
||||
break
|
||||
;;
|
||||
desktop)
|
||||
modules="repos.sh
|
||||
updates.sh
|
||||
pkgs.sh
|
||||
zram.sh
|
||||
desktop.sh"
|
||||
break
|
||||
;;
|
||||
* )
|
||||
echo "Please answer server/desktop."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for i in $modules
|
||||
do
|
||||
@@ -25,4 +48,5 @@ done
|
||||
|
||||
# End message
|
||||
echo
|
||||
echo "Post-installation done !"
|
||||
echo "Successfully completed !"
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user