This commit is contained in:
julien
2025-09-23 19:27:33 +02:00
parent ba023e9f59
commit f3cdbcdc8c
13 changed files with 178 additions and 67 deletions

View File

@@ -1,10 +1,10 @@
# debian # 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 ## Usage
Run the `run.sh` script. Run the `run.sh` script and choose your profile.
## Manual tasks ## Manual tasks
@@ -20,3 +20,7 @@ And add the following content :
# Run the NETig backup script at 4h every monday # Run the NETig backup script at 4h every monday
0 4 * * mon /usr/local/sbin/netig-srv-backup 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
View 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
View 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()

View File

@@ -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
View 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

View File

@@ -1,16 +1,10 @@
#!/bin/bash #!/bin/bash
#############
### Docker
echo echo
echo " => Docker" echo " => Docker"
echo echo
if [ -f /usr/bin/docker ] if [ ! -f /usr/bin/docker ]; then
then
echo " -> Already done !"
else
# Add Docker's official GPG key # Add Docker's official GPG key
mkdir -p /etc/apt/keyrings mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg --yes curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg --yes

View File

@@ -1,15 +1,44 @@
#!/bin/bash #!/bin/bash
#######################
### Install packages
echo echo
echo " => Packages" echo " => Packages"
echo echo
pkglist="git base="git
htop htop
tree tree
rsync" 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

View File

@@ -1,10 +1,12 @@
#!/bin/bash #!/bin/bash
###########################
### Repos configuration
echo echo
echo " => Repos configuration" echo " => Repositories"
echo 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

View File

@@ -1,8 +1,5 @@
#!/bin/bash #!/bin/bash
###################
### Copy scripts
echo echo
echo " => Scripts" echo " => Scripts"
echo echo

View File

@@ -1,10 +1,7 @@
#!/bin/bash #!/bin/bash
#############
### Update
echo echo
echo " => Update" echo " => Updates"
echo echo
apt-get update apt-get update

View File

@@ -1,26 +1,17 @@
#!/bin/bash #!/bin/bash
##########################
### Volumes mountpoints
echo echo
echo " => Volumes mountpoints" echo " => Volumes"
echo echo
if [ -d /var/netig/srv ] if [ ! -d /var/netig/srv ]; then
then
echo " -> Already done !"
else
mkdir -p /var/netig/srv mkdir -p /var/netig/srv
echo echo
echo " => Adjust /etc/fstab accordingly !" echo " => Adjust /etc/fstab accordingly !"
echo echo
fi fi
if [ -d /var/netig/bak ] if [ ! -d /var/netig/bak ]; then
then
echo " -> Already done !"
else
mkdir -p /var/netig/bak mkdir -p /var/netig/bak
echo echo
echo " => Adjust /etc/fstab accordingly !" echo " => Adjust /etc/fstab accordingly !"

View File

@@ -1,16 +1,11 @@
#!/bin/bash #!/bin/bash
###########
### ZRAM
echo echo
echo " => ZRAM" echo " => ZRAM"
echo echo
if [ -f /usr/bin/zramswap ] dpkg -l zram-tools > /dev/null 2>&1
then if [ $? -ne 0 ]; then
echo " -> Already done !"
else
apt-get install zram-tools -y apt-get install zram-tools -y
sed -i '/#ALGO=lz4/s/^#//g' /etc/default/zramswap sed -i '/#ALGO=lz4/s/^#//g' /etc/default/zramswap
sed -i '/#PERCENT=50/s/^#//g' /etc/default/zramswap sed -i '/#PERCENT=50/s/^#//g' /etc/default/zramswap

40
run.sh
View File

@@ -10,13 +10,36 @@ then
fi fi
# Post-installation # Post-installation
modules="repos.sh while true
update.sh do
pkgs.sh echo
docker.sh echo "Is it a server or a desktop machine ? (server/desktop)"
zram.sh read -p "> " answer
scripts.sh export profile=$answer
volumes.sh" 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 for i in $modules
do do
@@ -25,4 +48,5 @@ done
# End message # End message
echo echo
echo "Post-installation done !" echo "Successfully completed !"
echo