OSDN Git Service

[add] : calamares modules
authorwatasuke102 <watasuke102@gmail.com>
Fri, 28 Aug 2020 11:08:12 +0000 (20:08 +0900)
committerwatasuke102 <watasuke102@gmail.com>
Fri, 28 Aug 2020 11:08:12 +0000 (20:08 +0900)
channels/i3/airootfs.any/usr/share/calamares/final-process [new file with mode: 0644]
channels/i3/airootfs.any/usr/share/calamares/modules/users.conf [new file with mode: 0644]

diff --git a/channels/i3/airootfs.any/usr/share/calamares/final-process b/channels/i3/airootfs.any/usr/share/calamares/final-process
new file mode 100644 (file)
index 0000000..d7a18d8
--- /dev/null
@@ -0,0 +1,49 @@
+#!/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/autologin.conf
+remove /root/.automated_script.sh
+remove /etc/mkinitcpio-archiso.conf
+remove /etc/initcpio
+
+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/{choose-mirror.service,getty@tty1.service.d}
+
+# Disabled auto login
+sed -i "s/^autologin/#autologin/g" /etc/lightdm/lightdm.conf
diff --git a/channels/i3/airootfs.any/usr/share/calamares/modules/users.conf b/channels/i3/airootfs.any/usr/share/calamares/modules/users.conf
new file mode 100644 (file)
index 0000000..a0bf912
--- /dev/null
@@ -0,0 +1,142 @@
+# 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
+    - network
+    - storage
+    - wheel
+    - audio
+    - sudo
+
+# 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' here.
+# Possible values are:
+#  - true to check or
+#  - false to uncheck
+# These set the **initial** state of the checkbox.
+doAutologin:     false
+
+# When *sudoersGroup* is set to a non-empty string, Calamares creates a
+# sudoers file for the user. This file is located at:
+#     `/etc/sudoers.d/10-installer`
+# Remember to add the (value of) *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:    sudo
+
+# Setting this to false, causes the root account to be disabled.
+# When disabled, hides the "Use the same password for administrator"
+# checkbox. Also hides the "Choose a password" and associated text-inputs.
+setRootPassword: true
+
+# You can control the initial state for the 'reuse password for root'
+# checkbox here. Possible values are:
+#  - true to check or
+#  - false to uncheck
+#
+# When checked, the user password is used for the root account too.
+#
+# NOTE: *doReusePassword* requires *setRootPassword* to be enabled.
+doReusePassword: false
+
+# These are optional password-requirements that a distro can enforce
+# on the user. The values given in this sample file set only very weak
+# validation settings.
+#
+# - nonempty rejects empty passwords
+# - there are no length validations
+# - libpwquality (if it is enabled at all) has no length of class
+#   restrictions, although it will still reject palindromes and
+#   dictionary words with these settings.
+#
+# 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)
+#
+#  - To disable specific password validations:
+#    comment out the relevant 'passwordRequirements' keys below.
+#  - To disable all password validations:
+#    set both 'allowWeakPasswords' and 'allowWeakPasswordsDefault' to true.
+#    (That will show the box *Allow weak passwords* in the user-
+#    interface, and check it by default).
+passwordRequirements:
+    nonempty: true
+    minLength: 1  # Password at least this many characters
+    maxLength: -1  # Password at most this many characters
+    libpwquality:
+        - minlen=0
+        - minclass=0
+
+# You can control the visibility of the 'strong passwords' checkbox here.
+# Possible values are:
+#  - true to show or
+#  - false to hide  (default)
+# the checkbox. This checkbox allows the user to choose to disable
+# password-strength-checks. By default the box is **hidden**, so
+# that you have to pick a password that satisfies the checks.
+allowWeakPasswords: true
+# You can control the initial state for the 'strong passwords' checkbox here.
+# Possible values are:
+#  - true to uncheck or
+#  - false to check (default)
+# the checkbox by default. Since the box is labeled to enforce strong
+# passwords, in order to **allow** weak ones by default, the box needs
+# to be unchecked.
+allowWeakPasswordsDefault: false
+
+# 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: /bin/zsh
+
+# Hostname setting
+#
+# The user can enter a hostname; this is configured into the system
+# in some way; pick one of:
+#   - *None*, to not set the hostname at all
+#   - *EtcFile*, to write to `/etc/hostname` directly
+#   - *Hostnamed*, to use systemd hostnamed(1) over DBus
+# The default is *EtcFile*.
+setHostname: EtcFile
+
+# Should /etc/hosts be written with a hostname for this machine
+# (also adds localhost and some ipv6 standard entries).
+writeHostsFile: true