echo "LANG=${localegen}" > "/etc/locale.conf"
truncate -s 0 /etc/machine-id
-passwd -u -f root
\ No newline at end of file
+passwd -u -f root
+
+
+# Calamares configs
+
+# Replace the configuration file.
+# unpackfs
+kernel_filename=vmlinuz-$(ls /lib/modules)
+sed -i "s|%KERNEL_FILENAME%|${kernel_filename}|g" /usr/share/calamares/modules/unpackfs.conf
+
+# Remove configuration files for other kernels.
+#remove /usr/share/calamares/modules/initcpio/
+#remove /usr/share/calamares/modules/unpackfs/
+
+# Set up calamares removeuser
+sed -i s/%USERNAME%/${username}/g /usr/share/calamares/modules/removeuser.conf
+
+# Set user shell
+sed -i "s|%USERSHELL%|'${usershell}'|g" /usr/share/calamares/modules/users.conf
+
+# Add disabling of sudo setting
+echo -e "\nremove \"/etc/sudoers.d/fedoralive\"" >> /usr/share/calamares/final-process
+
--- /dev/null
+NAME=SereneLinux
+VERSION="32 (Thirty Two)"
+ID=fedora
+VERSION_ID=32
+PRETTY_NAME="SereneLinux"
+ANSI_COLOR="0;34"
+CPE_NAME="cpe:/o:fedoraproject:fedora:32"
+HOME_URL="https://fedoraproject.org/"
+SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
+BUG_REPORT_URL="https://bugzilla.redhat.com/"
+REDHAT_BUGZILLA_PRODUCT="Fedora"
+REDHAT_BUGZILLA_PRODUCT_VERSION=32
+REDHAT_SUPPORT_PRODUCT="Fedora"
+REDHAT_SUPPORT_PRODUCT_VERSION=32
+PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
+LOGO=SereneLinux
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env bash
+
+set -e
+
+function remove () {
+ local list
+ local file
+ list=($(echo "$@"))
+ for file in "${list[@]}"; do
+ if [[ -f ${file} ]]; then
+ rm -f "${file}"
+ elif [[ -d ${file} ]]; then
+ rm -rf "${file}"
+ fi
+ done
+}
+
+while getopts 'u:' arg; do
+ case "${arg}" in
+ u) user="${OPTARG}";;
+ esac
+done
+
+remove /etc/skel/Desktop
+remove /etc/skel/.config/gtk-3.0/bookmarks
+remove /home/${user}/Desktop/calamares.desktop
+remove /root/Desktop/calamares.desktop
+remove /home/${user}/.config/gtk-3.0/bookmarks
+remove /usr/share/calamares/
+
+remove /etc/polkit-1/rules.d/01-nopasswork.rules
+
+# Delete unnecessary files of archiso.
+# See the following site for details.
+# https://wiki.archlinux.jp/index.php/Archiso#Chroot_.E3.81.A8.E3.83.99.E3.83.BC.E3.82.B9.E3.82.B7.E3.82.B9.E3.83.86.E3.83.A0.E3.81.AE.E8.A8.AD.E5.AE.9A
+
+remove /etc/systemd/system/getty@tty1.service.d/override.conf
+remove /root/.automated_script.sh
+
+remove /etc/profile.d/alias_systemctl_setup.sh
+
+remove /etc/systemd/journald.conf.d/volatile-storage.conf
+remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
+
+remove /etc/udev/rules.d/81-dhcpcd.rules
+remove /etc/systemd/system/getty@tty1.service.d
+remove /etc/systemd/system/alteriso-reflector.service
--- /dev/null
+# Removes a single user (with userdel) from the system.
+# This is typically used in OEM setups or if the live user
+# spills into the target system.
+#
+# The module never fails; if userdel fails, this is logged
+# but the module still reports success and installation / setup
+# continues as normal.
+---
+# Username in the target system to be removed.
+username: %USERNAME%
--- /dev/null
+# Unsquash / unpack a filesystem. Multiple sources are supported, and
+# they may be squashed or plain filesystems.
+#
+# Configuration:
+#
+# from globalstorage: rootMountPoint
+# from job.configuration: the path to where to mount the source image(s)
+# for copying an ordered list of unpack mappings for image file <->
+# target dir relative to rootMountPoint.
+
+---
+# Each list item is unpacked, in order, to the target system.
+#
+# Each list item has the following **mandatory** attributes:
+# - *source* path relative to the live / intstalling system to the image
+# - *sourcefs* the type of the source files; valid entries are
+# - `ext4` (copies the filesystem contents)
+# - `squashfs` (unsquashes)
+# - `file` (copies a file or directory)
+# - (may be others if mount supports it)
+# - *destination* path relative to rootMountPoint (so in the target
+# system) where this filesystem is unpacked. It may be an
+# empty string, which effectively is / (the root) of the target
+# system.
+#
+# Each list item **optionally** can include the following attributes:
+# - *exclude* is a list of values that is expanded into --exclude
+# arguments for rsync (each entry in exclude gets its own --exclude).
+# - *excludeFile* is a single file that is passed to rsync as an
+# --exclude-file argument. This should be a full pathname
+# inside the **host** filesystem.
+#
+# EXAMPLES
+#
+# Usually you list a filesystem image to unpack; you can use
+# squashfs or an ext4 image. An empty destination is equivalent to "/",
+# the root of the target system. The destination directory must exist
+# in the target system.
+#
+# - source: "/path/to/filesystem.sqfs"
+# sourcefs: "squashfs"
+# destination: ""
+#
+# Multiple entries are unpacked in-order; if there is more than one
+# item then only the first must exist beforehand -- it's ok to
+# create directories with one unsquash and then to use those
+# directories as a target from a second unsquash.
+#
+# - source: "/path/to/another/filesystem.img"
+# sourcefs: "ext4"
+# destination: ""
+# - source: "/path/to/another/filesystem2.img"
+# sourcefs: "ext4"
+# destination: "/usr/lib/extra"
+#
+# You can list filesystem source paths relative to the Calamares run
+# directory, if you use -d (this is only useful for testing, though).
+#
+# - source: ./example.sqfs
+# sourcefs: squashfs
+# destination: ""
+#
+# You can list individual files (copied one-by-one), or directories
+# (the files inside this directory are copied directly to the destination,
+# so no "dummycpp/" subdirectory is created in this example).
+# Do note that the target directory must exist already (e.g. from
+# extracting some other filesystem).
+#
+# - source: ../CHANGES
+# sourcefs: file
+# destination: "/tmp/derp"
+# - source: ../src/modules/dummycpp
+# sourcefs: file
+# destination: "/tmp/derp"
+#
+# The *destination* and *source* are handed off to rsync, so the semantics
+# of trailing slashes apply. In order to *rename* a file as it is
+# copied, specify one single file (e.g. CHANGES) and a full pathname
+# for its destination name, as in the example below.
+
+#unpack:
+# - source: ../CHANGES
+# sourcefs: file
+# destination: "/tmp/changes.txt"
+# - source: src/qml/calamares/slideshow
+# sourcefs: file
+# destination: "/tmp/slideshow/"
+# exclude: [ "*.qmlc", "qmldir" ]
+# # excludeFile: /etc/calamares/modules/unpackfs/exclude-list.txt
+
+unpack:
+ - source: "/dev/mapper/live-base"
+ sourcefs: "ext4"
+ destination: ""
+ - source: "/run/initramfs/live/boot/vmlinuz"
+ sourcefs: "file"
+ destination: "/boot/%KERNEL_FILENAME%"
--- /dev/null
+# Configuration for the one-user-system user module.
+#
+# Besides these settings, the user module also places the following
+# keys into the globalconfig area, based on user input in the view step.
+#
+# - hostname
+# - username
+# - password (obscured)
+# - autologinUser (if enabled, set to username)
+#
+# These globalconfig keys are set when the jobs for this module
+# are created.
+---
+# Used as default groups for the created user.
+# Adjust to your Distribution defaults.
+defaultGroups:
+ - users
+ - lp
+ - video
+ - dialout
+ - wheel
+ - audio
+
+# Some Distributions require a 'autologin' group for the user.
+# Autologin causes a user to become automatically logged in to
+# the desktop environment on boot.
+# Disable when your Distribution does not require such a group.
+autologinGroup: autologin
+# You can control the initial state for the 'autologin checkbox' in UsersViewStep here.
+# Possible values are: true to enable or false to disable the checkbox by default
+doAutologin: false
+
+# When set to a non-empty string, Calamares creates a sudoers file for the user.
+# /etc/sudoers.d/10-installer
+# Remember to add sudoersGroup to defaultGroups.
+#
+# If your Distribution already sets up a group of sudoers in its packaging,
+# remove this setting (delete or comment out the line below). Otherwise,
+# the setting will be duplicated in the /etc/sudoers.d/10-installer file,
+# potentially confusing users.
+#sudoersGroup: wheel
+
+# Setting this to false , causes the root account to be disabled.
+setRootPassword: true
+# You can control the initial state for the 'root password checkbox' in UsersViewStep here.
+# Possible values are: true to enable or false to disable the checkbox by default.
+# When enabled the user password is used for the root account too.
+# NOTE: doReusePassword requires setRootPassword to be enabled.
+doReusePassword: true
+
+# These are optional password-requirements that a distro can enforce
+# on the user. The values given in this sample file disable each check,
+# as if the check was not listed at all.
+#
+# Checks may be listed multiple times; each is checked separately,
+# and no effort is done to ensure that the checks are consistent
+# (e.g. specifying a maximum length less than the minimum length
+# will annoy users).
+#
+# The libpwquality check relies on the (optional) libpwquality library.
+# Its value is a list of configuration statements that could also
+# be found in pwquality.conf, and these are handed off to the
+# libpwquality parser for evaluation. The check is ignored if
+# libpwquality is not available at build time (generates a warning in
+# the log). The Calamares password check rejects passwords with a
+# score of < 40 with the given libpwquality settings.
+#
+# (additional checks may be implemented in CheckPWQuality.cpp and
+# wired into UsersPage.cpp)
+passwordRequirements:
+ minLength: -1 # Password at least this many characters
+ maxLength: -1 # Password at most this many characters
+# libpwquality:
+# - minlen=0
+# - minclass=0
+
+# Shell to be used for the regular user of the target system.
+# There are three possible kinds of settings:
+# - unset (i.e. commented out, the default), act as if set to /bin/bash
+# - empty (explicit), don't pass shell information to useradd at all
+# and rely on a correct configuration file in /etc/default/useradd
+# - set, non-empty, use that path as shell. No validation is done
+# that the shell actually exists or is executable.
+userShell: %USERSHELL%