Initial-setup customizations

So I wanted to customize initial-setup a little bit to drop specific config files in ~/.config and maybe execute a couple bash scripts(as an unprivileged user) upon first boot for a device, but I’m a little lost on how to do that. With Anaconda I can just drop a kickstart file and it does whatever the hell I tell it to do but initial-setup doesn’t appear to have any kind of similar functionality, or if it does I can’t really find any good documentation on it other than the readme on github which is about the most informative document I could find on it, but gives little more than a simple description of the software.

Btw, I wanted to know if it actually does anything not explicitly listed in that github readme, from what I can tell it might be responsible for creating subdirectories for ~ like ~/Documents, but I can’t tell for sure if initial-setup is the program doing that, nor do I know if it does any other little things. Would be nice to know so I know when to explicitly disable it.

The files and directories in the user home directories are created when adduser/useradd is run and are copied in from /etc/skel.

Specific scripts can be created for the first time that user logs in but unless you want that script to be available for every new user /etc/skel would not be the place for that.

It is possible to force a user to create their password with the first login and it seems that might have some utility for your use case.

There are a couple of services run by systemd for first boot and for gnome config with the first boot but those are done with binary files.

Maybe you could use a systemd service that is run at first boot to trigger the scripts you are referencing.

To customize initial-setup , you can create a custom shell script to drop configuration files in ~/.config and execute bash scripts upon first boot. initial-setup primarily handles user environment setup tasks like creating default directories (~/Documents , ~/Downloads ) and configuring system preferences. For more advanced customization, consider using configuration management tools like Ansible or Puppet, or creating a custom Kickstart script for installation.