#!/usr/bin/env bash
#
# Author: Dmitry Razumov <asmeron@ublinux.com>
# Copyright (c) 2021-2025 UBLinux <support@ublinux.com>
#

##
## This file contains default values for ublinux configurations
##

declare -A AUTHPAM
declare -A JOURNALD
declare -A SYSTEMD_COREDUMP
declare -A DOMAIN
declare -A REPOSITORY
declare -A REPOPUBLIC_CACHE
declare -A AUTOUPDATE
declare -A UBPILE
declare -A AUTOINSTALL
declare -A UPDATEHOME

##/rc.desktop/all/* is launching when desktop is ready

#/rc.desktop/all/autoexec
# autostart apps/scripts
#AUTOEXEC=

#/rc.desktop/all/placeondesktop
#/rc.desktop/deonly/xfce4-ubinstall-trust
UBINSTALL_DESKTOP="ubinstall-gtk,ubinstall.cli"

#/rc.desktop/all/fusion-icon
# timeout to start fusion-icon
#FUSIONICONTIMEOUT=5
# disable fusion-icon for de
#FUSIONICONDEDIS=gnome-shell,gnome,i3term

#/rc.desktop/all/keyboard
# set keyboard layout when system start
#RESETKBMODE=yes
# set on/off/autoset numlock kbd mode
#NUMLOCK

#/rc.desktop/all/ublinuxupdate
UBLINUXUPDATE=ask
MUPDSRCHTTP=http://mirror.yandex.ru/ublinux/netlive
MUPDSRCRSYNC=rsync://mirror.yandex.ru:/ublinux/netlive

#/rc.desktop/all/xbindkeys
#XBINDKEYSSTART=yes
#XBINDKEYSOPTIONS=

#/rc.desktop/gnome/guake
#GUAKESTART=yes

#/rc.desktop/all/pulseaudio
#PULSEAUDIOSTART=yes

#/rc.desktop/kde/hideloop4dolphin
# kde dolphin workaround. scripts hides loop devices in places bar
#HIDELOOP4DOLPHIN=yes
#DOLPHINBOOKMARKS=.local/share/user-places.xbel
#HIDELOOP=255
#HIDERAM=0

#/rc.desktop/kde/yakuake
#YAKUAKESTART=yes

#/rc.desktop/kde/parcellite
#PARCELLITESTART=yes

#/rc.domain.d/30-usershwaccess
#DOMUSGR=audio,video,usb,vboxusers,bumblebee,cdrom,cdwriter,lp,floppy

#/rc.halt/20-grub
GRUB_BOOT_SILENT="splash loglevel=3"

#/rc.halt/20-timesave
#HALTSAVETIME=yes

#/rc.post.d/10-brand-backgrounds
BACKGROUND_RES=1920x1080

#DELETE
#/rc.local.d/01-background
#WPDEFDIR=/mnt/livedata/ublinux-data/backgrounds/wallpapers/Default
#SSDEFDIR=/mnt/livedata/ublinux-data/backgrounds/screensaver/Default
#WPSYSDIR=/usr/share/ublinux/wallpapers/Default
#SSSYSDIR=/usr/share/ublinux/screensaver/Default
#WPDEFFILE=/usr/share/ublinux/wallpapers/default.jpg

#/rc.xorg/01-background
BACKGROUND_DE=/usr/share/backgrounds/background.jpg

#/rc.post.d/12-dm-background
BACKGROUND_DM=/usr/share/backgrounds/dm.jpg

#/rc.local.d/10-network
# start interface if its not networkmanager
#AUTOSTARTIFNNM=yes
#NFSMOUNTTM=10
#NFSMOUNTWAIT=6
#NFSOPTS="vers=3,nolock,users,noauto"

#/rc.local.d/31-sound
# to set default alsa card in case of 0 card is HDMI (see aplay -l)
#SNDFINCARD=yes
# mixer settings (see amixer)
#SNDMIXSET=yes
#SNDMIX_MASTER_N=Master
#SNDMIX_MASTER_VOL=35%
#SNDMIX_DEFAULT_VOL=90%
#SNDMIX_SWITCH_ON="IEC958 Playback Default,IEC958 Playback Switch"
#SNDMIX_SWITCH_OFF="Beep Playback Switch,Mic Playback Switch"

#/rc.local.d/51-gtk-update-icon-cache
#UPDATEGTKICONCACHE=yes
#UPDATEGTKICONOPTS="-fit /usr/share/icons/hicolor"

#/rc.local.d/51-mozilla_extensions
#REGISTERMOZEXT=yes

#/rc.local.d/81-samba
# make random passwords for samba users (for home nets)
#MKSMBPWD=yes

#/rc.post.d/02-hwclock
#SETCLKATSTART=yes

# for help "man xkeyboard-config"
#/rc.post.d/11-xorg
HARDCONF=etc/ublinux/service.conf
# make /etc/X11/xorg.conf.d/00-keyboard.conf
#SETXORGRES=yes
#MKKBDFXORG=yes

# options (only if its not specified in /etc/ublinux/keyboard )
#/rc.desktop/all/keyboard
#/rc.xorg/10-fixkeyboard_layout
XKBMODEL=pc105
XKBLAYOUT=us,ru
XKBVARIANT=ru
XKBOPTIONS=grp:lctrl_lshift_toggle,grp_led:scroll,compose:rwin

KEYBOARD=ru
KEYTABLE=ru4
#STEAMNODPMS=yes

#/rc.preinit/10-accounts
DEFAULTPASSWD='$6$E7stRhRS8fCKk7UU$Qoqw62AUaUa5uLIc2KC7WV3MUThhrR8kjXtCODmnKCzKe2zHu1/wmsiWBHZEIk/IQnk/aELQYbUK93OUtrwg60'
DEFAULTROOTPASSWD='$6$E7stRhRS8fCKk7UU$Qoqw62AUaUa5uLIc2KC7WV3MUThhrR8kjXtCODmnKCzKe2zHu1/wmsiWBHZEIk/IQnk/aELQYbUK93OUtrwg60'
DEFAULTUSER=superadmin
# Для параметра NEEDEDUSERS: если указана основная группа 'x', то основная будет DEFAULTGROUP
# Для параметра ADDUSER: группа DEFAULTGROUP будет добавлена к USERGROUPS
DEFAULTGROUP=users
USERGROUPS=nobody,scanner,power,audio,lp,optical,storage,video,sambashare,vboxusers,libvirt
NOSECUREROOTPASSWD="${DEFAULTROOTPASSWD}"
ADMGROUPS=wheel,vboxsf,disk
ADMUID=1000
ADDADM=yes
HASHPASSWD=yescrypt
UPDATEHOME[root]=yes

#/rc.preinit/50-xorg
#NVIDIATEST="nvidia-current nvidia340 nvidia304 nvidia"
#FAILSAFENVIDIA=nouveau
#CREATE_XORG_CONF=yes
#XFILE=etc/X11/xorg.conf

#/rc.preinit/02-skel-adds
STEAMAPP=/mnt/livedata/ublinux-data/steam

#/rc.preinit.d/30-network-hostname
HOSTNAME=ublinux-install

#/rc.preinit.d/53-language
#FORCE_LOCARCHIVE=no
LOCALE="en_US.UTF-8,ru_RU.UTF-8"
LANG="ru_RU.UTF-8"
CONSOLE_FONT=cyr-sun16
CONSOLE_KEYMAP=ru
CONSOLE_KEYMAP_TOGGLE="grp:lctrl_lshift_toggle"

#/rc.preinit.d/10-system
MACHINEID=hardware

#/rc.preinit.d/20-services
SERVICES_ENABLE=dbus-broker,NetworkManager,sshd,swapspace,systemd-timesyncd,cups,cockpit.socket,avahi-daemon,avahi-dnsconfd,smb,nmb,winbind,bluetooth

#/rc.preinit.d/23-publicdir
# Папка с правами 777 доступная всем локальным пользователям и при разрешении всем из сети
PUBLICDIR=/home/public

#/rc.halt.pre/10-shutdown
#HALTSERVICESSTOP=""
#HALTPROCESSESKILL="slim kdm X lxdm xdm sddm cupsd pdnsd mc mandb"

#/rc.post.d/03-modprobepreload
#MODPROBEPRELOAD=yes

#/rc.post/11-xorg
#DELETE_XORG_CONF=no

#/scripts/ublinuxrepack
#MKSQFS_FASTALG="-b 512K -comp lz4 -Xhc"
MKSQFS_FASTALG="-b 32K -comp gzip"

#/rc.desktop/lxqt/qterminal
#QTERMINALSTART=yes

#/rc.post.d/02-hwclock
#/rc.halt/20-timesave
HWCLOCK_SYNC=utc

#/rc.preinit.d/10-system
ZONE=Etc/UTC

#/rc.preinit.d/01-depmod
DEPMOD=yes

#/rc.preinit.d/03-ldconfig
RUNLDCONFIG=yes

#/rc.preinit.d/52-desktop
#/rc.post.d/02-hwclock
#/rc.post.d/11-xorg
SYSCONF=/etc/ublinux

#/rc.preinit.d/21-ntp
NTPSERVERS="dhcp"
NTPSERVERS_DEFAULT="0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"
NTPSERVERS_RU="ntp1.vniiftri.ru ntp2.vniiftri.ru ntp3.vniiftri.ru ntp4.vniiftri.ru ntp21.vniiftri.ru ru.pool.ntp.org"
NTPSERVERS_FALLBACK="0.ru.pool.ntp.org 1.ru.pool.ntp.org 2.ru.pool.ntp.org 3.ru.pool.ntp.org"
NTP_SYSTEMSERVICE="systemd-timesyncd.service"

#/rc.d/rc.desktop
#NOEXEC="i3term:xbindkeys;i3term:fusion-icon;i3term:ublinuxupdate"

#/rc.desktop/i3term/exclusiveapp
#EXCLUSIVEAPP=remmina

#/functions
#MKSQFS_OPTS="-b 512K -comp xz -Xbcj x86"
MKSQFS_OPTS="-b 32K -comp gzip"

SAMBA_USERSHARE=enable

AUTHPAM[minimal]="with-faillock,with-time,with-systemd-homed,with-mkhomedir-simple,with-pamaccess"
AUTHPAM[local]="with-faillock,with-time,with-systemd-homed,with-mkhomedir-simple,with-pamaccess"
AUTHPAM[nis]="with-faillock,with-time,with-systemd-homed,with-mkhomedir-simple,with-pamaccess"
AUTHPAM[winbind]="with-faillock,with-time,with-systemd-homed,with-mkhomedir-simple,with-pamaccess"
AUTHPAM[sssd]="with-faillock,with-time,with-systemd-homed,with-mkhomedir-simple,with-pamaccess,with-sudo,with-mdns4,with-mdns6"
AUTHPAM=local

JOURNALD[Storage]=persistent
JOURNALD[Compress]=yes
JOURNALD[SystemMaxUse]=8M
JOURNALD[RuntimeMaxUse]=8M
SYSTEMD_COREDUMP[Storage]=none
SYSTEMD_COREDUMP[ProcessSizeMax]=0

DOMAIN[client]=realmd_sssd

REPOSITORY[core]=/etc/pacman.d/mirrorlist
REPOSITORY[extra]=/etc/pacman.d/mirrorlist
REPOSITORY[community]=/etc/pacman.d/mirrorlist
REPOSITORY[multilib]=/etc/pacman.d/mirrorlist
REPOSITORY[modules]=/etc/pacman.d/mirrorlist
#REPOSITORY[ublinux]=/etc/pacman.d/mirrorlist

REPOPUBLIC_CACHE[port]="8080"
REPOPUBLIC_CACHE[cache_dir]="/memory/layer-base/1/repopublic_cache"
REPOPUBLIC_CACHE[purge_files_after]="0"
REPOPUBLIC_CACHE[download_timeout]="3600"
REPOPUBLIC_CACHE[user_agent]="repopublic/1.0"

AUTOUPDATE[mode]=modsys
AUTOUPDATE[interval]=boot,7d

#Aplication UBPile
UBPILE[debug_level]=1
UBPILE[secret_key]="4a6ed27e0434490028ff63b11f12fb7c"
UBPILE[server_comm_use_hostnames]="false"
UBPILE[web_direct_connect]="false"
UBPILE[web_socket_use_hostnames]="false"

#Aplication ubinstall
AUTOINSTALL[part_size]="16G"
AUTOINSTALL[part_fs_type]="ext4"
AUTOINSTALL[user_name]="${DEFAULTUSER}"
AUTOINSTALL[user_gecos]="Administrator"
AUTOINSTALL[user_password]="${DEFAULTPASSWD}"
AUTOINSTALL[root_password]="${DEFAULTROOTPASSWD}"
AUTOINSTALL[log]=yes

